sqlite - Why am I getting "Unable to load DLL 'sqlite3'" in my WPF app? -


i added thought necessary sqlite (and sqlite-net) packages app. on running it, though, exception:

system.dllnotfoundexception unhandled user code hresult=-2146233052 message=unable load dll 'sqlite3': specified module not found. (exception from

i have following sqlite packages installed:

enter image description here

what missing?

update

i tried ajawad987's suggestion, still same runtime error, though i've got this:

enter image description here

...and this:

enter image description here

update 2

where runtime exception takes place (in sqlite.cs) seems odd me:

if silverlight || use_csharp_sqlite

        var r = sqlite3.open (databasepath, out handle, (int)openflags, intptr.zero); 

else

        // open using byte[]         // in case path may include unicode         // force open using utf-8 using sqlite3_open_v2         var databasepathasbytes = getnullterminatedutf8 (databasepath);         var r = sqlite3.open (databasepathasbytes, out handle, (int) openflags, intptr.zero); 

endif

but am using c#, why line that's failing running? (it fails in "else" block)?

is project build set any cpu? you'll need set either x86 or x64 sqlite3. x86 route yield more compatibility across devices, recommend option unless doing specific 64-bit stuff.

edit: you'll need download actual sqlite dll manually sqlite's main site. file want named sqlite-dll-win32-x86-3080702.zip. extract dll zip , add project content file. set copy output directory option in properties tool window copy always, , rebuild. ensure project set x86 option mentioned above.

this should hopefully trick... been while since i've used sqlite in .net application.

side notes: nuget package downloaded contains c# wrapper library around real sqlite dll.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -