diff --git a/Bonsai.Configuration/Bonsai.Configuration.csproj b/Bonsai.Configuration/Bonsai.Configuration.csproj
index a9481233..a1f26f4e 100644
--- a/Bonsai.Configuration/Bonsai.Configuration.csproj
+++ b/Bonsai.Configuration/Bonsai.Configuration.csproj
@@ -4,7 +4,7 @@
false
false
net472;netstandard2.0
- 2.8.0
+ 2.8.1
diff --git a/Bonsai.Configuration/ConfigurationHelper.cs b/Bonsai.Configuration/ConfigurationHelper.cs
index 885726b0..6addab57 100644
--- a/Bonsai.Configuration/ConfigurationHelper.cs
+++ b/Bonsai.Configuration/ConfigurationHelper.cs
@@ -37,6 +37,11 @@ static void AddLibraryPath(string path)
currentPath = string.Join(new string(Path.PathSeparator, 1), path, currentPath);
Environment.SetEnvironmentVariable(PathEnvironmentVariable, currentPath);
}
+
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ NativeMethods.AddDllDirectory(path);
+ }
}
public static string GetConfigurationRoot(PackageConfiguration configuration = null)
diff --git a/Bonsai.Configuration/NativeMethods.cs b/Bonsai.Configuration/NativeMethods.cs
new file mode 100644
index 00000000..53fb56fa
--- /dev/null
+++ b/Bonsai.Configuration/NativeMethods.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace Bonsai.Configuration
+{
+ static class NativeMethods
+ {
+ [DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
+ internal static extern int AddDllDirectory(string NewDirectory);
+ }
+}
diff --git a/Bonsai.Player/Bonsai.Player.csproj b/Bonsai.Player/Bonsai.Player.csproj
index a20d0ae6..d6e210e3 100644
--- a/Bonsai.Player/Bonsai.Player.csproj
+++ b/Bonsai.Player/Bonsai.Player.csproj
@@ -12,7 +12,7 @@
icon.png
- 2.8.0
+ 2.8.1
true
diff --git a/Bonsai/Bonsai.csproj b/Bonsai/Bonsai.csproj
index 3107025a..3be714d1 100644
--- a/Bonsai/Bonsai.csproj
+++ b/Bonsai/Bonsai.csproj
@@ -7,7 +7,7 @@
false
true
net48
- 2.8.0
+ 2.8.1
Exe
true
..\Bonsai.Editor\Bonsai.ico