我在我的应用程序中从sqlLite生成了我的模型,但是当我尝试调用DBContext时调用它会抛出异常.
An exception of type
System.IO.FileLoadException
occurred in
mscorlib.dll
but was not handled in user codeAdditional 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
located assembly’s manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
请帮我.
解决方法
控制WebApi和Asp.Net MVC项目输出bin目录,看看它们是否真的有System.Data.sqlite.EF6.dll.
很可能他们没有这个DLL,你需要为这个dll设置Copy Local属性.