.net – SQL Lite异常

前端之家收集整理的这篇文章主要介绍了.net – SQL Lite异常前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在我的应用程序中从sqlLite生成了我的模型,但是当我尝试调用DBContext时调用它会抛出异常.

An exception of type System.IO.FileLoadException occurred in
mscorlib.dll but was not handled in 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
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属性.

猜你在找的MsSQL相关文章