Closed pkindruk closed 1 year ago
This should work...? Must be a build / packaging issue. I'll try to replicate it
I'm pretty sure this was tested, but can you try pulling the previous version of the x86 binary? I'm wondering if the flag wasn't properly set and didn't produce the 32 bit binary.
Nevermind, I've verified that there is something off about the 32 bit dll.
I'm working on putting together a better script to keep the native libs up to date and less manual than it is today. Hopefully that will reduce the possibility of this happening again.
https://github.com/CoreyKaylor/Lightning.NET/pull/157 Should fix your issue.
'lmdbautoresize.dll' is loading now in test app. Can't verify on real app yet, I have some issues with configuration on my side. It will take some time before I get there to resolve them.
Going to close this now that https://github.com/CoreyKaylor/Lightning.NET/pull/157 is merged. Feel free to open again if your findings show there are still problems.
Published version 0.15.0 that includes this change.
Hi, I have been using x64 version for quite a while, which works. But recently I had to run my project on x86 and it fails with
DllNotFoundException
. After some debugging I found simple repro steps:lmdbautoresize.dll
from sourcesconst string path = @"c:\Users\admin\Downloads\lmdbautoresize.dll";
Console.WriteLine($"File exists={File.Exists(path)}"); NativeLibrary.Load(path); Console.WriteLine("Success");
PS C:\Users\admin\repos\test> dotnet run -c Debug File exists=True Unhandled exception. System.DllNotFoundException: Unable to load DLL 'c:\Users\admin\Downloads\lmdbautoresize.dll' or one of its dependencies: The specified module could not be found. (0x8007007E) at System.Runtime.InteropServices.NativeLibrary.LoadFromPath(String libraryName, Boolean throwOnError) at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath) at Program.$(String[] args) in C:\Users\admin\repos\test\Program.cs:line 6
PS C:\Users\admin\repos\test> dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.404 Commit: be4f3ec411
Runtime Environment: OS Name: Windows OS Version: 10.0.19045 OS Platform: Windows RID: win10-x86 Base Path: C:\Program Files\dotnet\sdk\6.0.404\
global.json file: Not found
Host: Version: 6.0.12 Architecture: x86 Commit: 02e45a41b7
.NET SDKs installed: 6.0.404 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Download .NET: https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs: https://aka.ms/dotnet/runtimes-sdk-info