Failed to load sqlite dll WPF dll

I am making one WPF application and trying to deploy / publish it. While I run the application in Visual Studio, everything is in order. But when I try to split the [From Release folder] deployment files into antoher location and try to run, I get an error.

Unable to load DLL 'SQLite.Interop.dll': The specified module was not found. (Exception from HRESULT: 0x8007007E)

I copied the files App.exe + App.exe.config + System.Data.SQLite.dll from the release folder.

Additional Information:

I installed the SQLite Nuget package.

I tried by unchecking, preferring 32-bit and setting the platform for any processor in the solution properties.

I'm new to WPF, can anyone fix me if my deployment process or something else is wrong?

Update:

I also tried to copy the entire SQLite-owned DLL to a new location along with the exe solution file, but the same error appears.

List of files that I have compiled:

 App.exe
 App.exe.config
 System.Data.SQLite.dll
 System.Data.SQLite.EF6.dll
 System.Data.SQLite.Linq.dll
+1
source share
6 answers

In Solution Explorer, right-click in the project name and select ADD -> Existing Item. Then change your search to All Files (*.*)and open Sqlite.Interop.dll. You can find it in bin\debug\x86 (or x64) Now you have a dll in the project (if you right-click on it, you will see "Build action = content"). Change it to "Build Action = Embedded Resource".

Re-publish and all.

+2

, dll , exe:

System.Data.SQLite.dll
System.Data.SQLite.EF6.dll
System.Data.SQLite.Linq.dll

0

VS2015 Community WinForms:

  • root (x86, x84)
  • x86 x64 interop dll ( bin/debug/x86 x64.
  • " ", dll interop, .
  • DLL "" " ".

, .

, .

0

SQLite wiki , :

enter image description here

, . dll, , , . Dll YourSolution/packages/System.Data.SQLite.Core.% Version%/.

, SQLite.Interop.dll, x86 AppplicationFolder dll.

0

. , 64 interop.dll . . , 86, 32.

-1
source

For me, this didn’t quite work, as Mauro suggested above ( fooobar.com/questions/1649196 / ... ).

I got it by setting the assembly action to "content".

-1
source

Source: https://habr.com/ru/post/1649196/


All Articles