libsodium-net
libsodium-net copied to clipboard
libsodium-64.dll not copied by shadow copying functionnality of NUnit
When using Sodium in NUnit tests, this error message happens :
System.TypeInitializationException : The type initializer for 'Sodium.SodiumCore' threw an exception. ----> System.DllNotFoundException : Unable to load DLL 'libsodium-64.dll': Le module spécifié est introuvable. (Exception from HRESULT: 0x8007007E) at Sodium.SodiumCore.GetRandomBytes(Int32 count) --DllNotFoundException at DynamicDllInvokeType.sodium_init() at Sodium.SodiumCore.Init() at Sodium.SodiumCore..cctor()
It seems it comes from libsodium-64.dll being not copied by NUnit in the newly created test folder.
What problem????
My problem is is the server private the clash royale
If you're using Resharper and Continuous Testing, read this.
I got this one as well. First part of the solution was to
- create folder called "unmanaged" in your project folder
- manually copy libsodium.dll and libsodium-64.dll in it
- Add that directory in Global Environment Variable PATH in Global.asax
protected void Application_Start()
{
string path = Environment.GetEnvironmentVariable("PATH");
string binDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "unmanaged");
if (path!=null && !path.Contains(binDir))
{
Environment.SetEnvironmentVariable("PATH", path + ";" + binDir);
}
And that did it for my DEV machine...
But, I got the exact same error when deployed to our QA environment. After spending hours messing with permissions, trying to figure out if the dlls are in the right directory, and similar I ran into this post: https://mspcontrol.org/forums/topic/add-user-error-unable-to-load-dll-libsodium-64-dll/#post-4765
You have to install Visual C++ Redistributable for Visual Studio 2015 (13 Mb) https://www.microsoft.com/en-us/download/details.aspx?id=48145
In the end that solved the issue for me.
/xref BurningEnlightenment/libsodium-net#2
I no understand, pls you speak spainish
El 13 jul. 2017 12:35 p. m., "Igor Valjevic" [email protected] escribió:
I got this one as well. First part of the solution was to
create folder called "unmanaged"
manually copy libsodium.dll and libsodium-64.dll in it
Add that directory in Global Environment Variable PATH in Global.asax
protected void Application_Start() { string path = Environment.GetEnvironmentVariable("PATH"); string binDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "unmanaged"); if (path!=null && !path.Contains(binDir)) { Environment.SetEnvironmentVariable("PATH", path + ";" + binDir); }
And that did it for my DEV machine...
But, I got the exact same error when deployed to our QA environment. After spending hours messing with permissions, trying to figure out if the dlls are in the right directory, and similar I ran into this post: https://mspcontrol.org/forums/topic/add-user-error-unable- to-load-dll-libsodium-64-dll/#post-4765
You have to install Visual C++ Redistributable for Visual Studio 2015 (13 Mb) https://www.microsoft.com/en-us/download/details.aspx?id=48145
In the end that solved the issue for me.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adamcaudill/libsodium-net/issues/136#issuecomment-315040589, or mute the thread https://github.com/notifications/unsubscribe-auth/ATxFOWUWVEHiGbbhP6uRZi_PMlyGv6Hxks5sNfMAgaJpZM4IhXKx .