加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

.net – SQL Lite异常

发布时间:2020-12-12 07:25:33 所属栏目:MsSql教程 来源:网络整理
导读:我在我的应用程序中从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
我在我的应用程序中从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属性.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读