CoreyKaylor / Lightning.NET

.NET library for LMDB key-value store
Other
398 stars 82 forks source link

DllNotFoundException version 0.9.2.40 #66

Closed valeriob closed 8 years ago

valeriob commented 8 years ago

I created a library project that use LightningDB, create a new web app project (asp.net classic), invoking the library function it throws that exceptions saying "Additional information: C:\blablabla\ProjectWeb\lmdb32.dll" while the Lmdb32.dll is in C:\blablabla\ProjectWeb\bin\lmdb32.dll

CoreyKaylor commented 8 years ago

Try updating to 0.9.3-rc1-43 and let me know if that version works better for you. It has been changed to use DllImport and no longer needs names specific to the arch. So it will just be lmdb.dll and they are included with the nuget package as well.

valeriob commented 8 years ago

Thanks Corey, with rc1-43 the lmdb.dll does not get copy on the output folder of the lib project. The good news is that if i manually copy the correct file from packages\LightningDB.0.9.3-rc1-45\runtimes\win7-x86 to wwwProject\bin it works. do i need a particular version of nuget ? I'm on standard csproj system with nuget 3.4.2.830.

Thanks

CoreyKaylor commented 8 years ago

They made it sound when they announced the new native support for dnx projects that they either did or would support it from traditional projects in the future as well. In the meantime it's easy to just add an existing item to your project and make sure it's set to copy if newer.

CoreyKaylor commented 8 years ago

Or I should have said native dnx project / nuget supprt.

valeriob commented 8 years ago

yep but i have to copy link a specific arch dll while i'm targeting both 32 and 64 bits, i'll keep 0.9.2.40 version and try to work around that for now. Could you update on this issue if you know something ?

CoreyKaylor commented 8 years ago

Sure, not a problem.

CoreyKaylor commented 8 years ago

Going to close this for now. If anything changes w/regard to how DllImport + nuget works I'll be sure to comment here.

CoreyKaylor commented 8 years ago

Curious, have you tried updating the project to use the new project.json for managing nuget package dependencies? I believe this might solve your problems. Note, this doesn't require you to switch everything from csproj to xproj. It also comes with the added bonus of managing transitive dependencies as well.

https://oren.codes/2016/02/08/project-json-all-the-things/

valeriob commented 8 years ago

I did not try that approach yet, i will