SQL Lite Exception

I created my model from SQLLite in my application, but when I try to call DBContext Call, it throws an exception.

An exception of type System.IO.FileLoadException occurred in mscorlib.dll , but was not processed in the user code

Additional information: Could not load file or assembly 'System.Data.SQLite.EF6, Version = 1.0.93.0, Culture = neutral, PublicKeyToken = db937bc2d44ff139' or one of its dependencies. The installed assembly manifest definition does not match the Help assembly. (Exception from HRESULT: 0x80131040)

Please help me.

+7
sqlite system.data.sqlite
source share
3 answers

Manage your output directories in WebApi and Asp.Net MVC projects to see if they really have a System.Data.SQLite.EF6.dll file.

Most likely, they do not have this DLL, and you need to install Copy Local for this DLL.

0
source share

I have encountered a similar problem in the past. The problem in my case was that I was adding the same DLL from the file system and then had the nuget package as well as for the same component.

In your case, I see that you have a nuget package with a different version of "System.Data.SQLite.EF6.1.0.97.0". I would do below a. Remove all links (static dlls, if any).
b. Add links from the nuget package.


BTW, the sln file you sent does not have csproj (therefore, it cannot open proj files).

0
source share

Before entering the solution, let me explain to you about the errors that you are facing right now:

System.IO.FileLoadException :

An exception that is thrown when a managed assembly is detected, but cannot be loaded.

mscorlib :

Microsoft Core Library, that is, they are at the center of everything

Ref-Def-Mismatch :

This exception is thrown if there is an assembly that does not match what you are looking for. A very common mismatch is the version number, in this case here .

You must clear the configuration and provide the necessary Entity Framework Providers.

More links here

0
source share

All Articles