首页 > 数据库技术 > 详细

(转)SQLite部署-无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块

时间:2015-12-13 21:45:48      阅读:312      评论:0      收藏:0      [点我收藏+]

本文转载自:http://www.cnblogs.com/muzhiye/p/4284070.html

近期刚使用SQLite,主要引用的是System.Data.SQLite.dll这个dll,在部署到测试环境时报无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。

  技术分享

  后上官网查了下,sqlite-netFx40-binary-Win32-2010-1.0.94.0.zip 这个包中的System.Data.SQLite.dll是需用到SQLite.Interop.dll,但是这个dll不是.net版本的无法直接引用,只能拷贝到文件执行目录,不过时好时坏,无法完全避免报错。

  只能再次搜索,发现sqlite-netFx40-binary-bundle-Win32-2010-1.0.94.0.zip 这个包中的System.Data.SQLite.dll是不需要SQLite.Interop.dll,果断替换,本机运行无报错,上传到测试环境,结果又悲催了,软件启动就奔溃退出,这是闹那样?

  研究了下官网的描述: 

This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.94.0 (3.8.6) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET Framework 4.0 are required

   比对了下本机和测试环境,还真缺“Visual C++ 2010 SP1 runtime for x86”这个补丁,上微软官方找到下载地址,下载安装到测试环境,终于不再报错了。

 

未能加载文件或程序集“System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139”或它的某一个依赖项。试图加载格式不正确的程序。

引用会有这个dll的,如果有,请查看系统是不是64位的?  需要在生成里面设置,目标为x86,编译就可以了

(转)SQLite部署-无法加载 DLL“SQLite.Interop.dll”: 找不到指定的模块

原文:http://www.cnblogs.com/wpcnblog/p/5043628.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!