Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/OneWare.Core/Services/PluginService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,16 @@ private void SetupNativeImports(string pluginPath)
// Try 1
var libFileName = PlatformHelper.GetLibraryFileName(libraryName);
var libPath = Path.Combine(pluginPath, libFileName);


// Remove the 'lib' prefix and '.so' suffix, since some libraries are named like that for compatibility reasons
if (libFileName.EndsWith(".so.dll") && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
libFileName = libFileName.Replace(".so.dll", ".dll");

if (libFileName.StartsWith("lib"))
libFileName = libFileName[3..];
}

// Try 2 : look in runtimes folder
if (!File.Exists(libPath))
libPath = Path.Combine(pluginPath, "runtimes", PlatformHelper.PlatformIdentifier, "native",
Expand Down
Loading