新的 SQLite 混合程序集 [英] New SQLite mixed assemblies

查看:22
本文介绍了新的 SQLite 混合程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前可从 http://sqlite.phxsoftware.com 获得 .NET SQLite 库,但它们最近被主要的 SQLite 团队接管并转移了System.Data.SQLite 下载页面.新包似乎不再包含混合程序集(包含 sqlite3.dll 和 .NET 包装器的单个程序集).

Previously .NET SQLite libraries were available from http://sqlite.phxsoftware.com, but they have recently been taken over by the main SQLite team and have moved System.Data.SQLite Download Page. The new packages don't seem to contain mixed assemblies anymore (single assembly containing sqlite3.dll and the .NET wrapper).

新包带有 .NET DLL 和 SQLite.Interop.dll,基于文档的桌面不需要,但我的应用程序无法加载,Unable to load DLL'SQLite.Interop.DLL':找不到指定的模块..我尝试在 IIS/IIS Express 下运行应用程序,并将 apppool 设置为 32 位.

The new package comes with the .NET DLL and SQLite.Interop.dll which based on the documentation is not needed on the desktop but my application fails to load with Unable to load DLL 'SQLite.Interop.DLL': The specified module could not be found.. I have tried running the application under IIS/IIS Express with apppool set to 32-bit.

我尝试将 SQLite.Interop.dll 文件复制到 bin 文件夹、系统文件夹和 ASP.NET 临时文件夹中,但仍然出现相同的错误.

I have tried copying the SQLite.Interop.dll file into the bin folder, the system folder, and the ASP.NET temp folder but still get the same error.

是否有适用于新版本的混合程序集?如果没有,是否有办法修复 Unable to load DLL 'SQLite.Interop.DLL 错误?

Are there mixed assemblies for new releases available anywhere? If not, is there a way to fix the Unable to load DLL 'SQLite.Interop.DLL error?

推荐答案

我找到了解决方案.问题是由于 SQLite.Interop 的已知问题.dll.

I found the solution. The problem was due to a known issue with SQLite.Interop.dll.

这是对我有用的解决方法.

This is the workaround from that worked for me.

使用 Dependency Walker 从http://dependencywalker.com/ 去看看在 SQLite.Interop.dll(x86 和 x64)显示它依赖于MSVCR100.dll.

Using Dependency Walker from http://dependencywalker.com/ to look at SQLite.Interop.dll (x86 and x64) shows that it depends on MSVCR100.dll.

旧的 1.0.66.0 版本System.Data.SQLite.dll 没有这种依赖.随着当前构建,我们将不得不重新分配MSVCR100.dll 也或运行来自 Microsoft 的安装程序.

The old 1.0.66.0 version of System.Data.SQLite.dll does not have this dependency. With the current build, we would have to redistribute that MSVCR100.dll also or run an installer from Microsoft.

解决方案:来自:缺少 msvcr100.dll

使用静态链接.在里面SQLite.Interop Visual Studio 项目.转到此属性设置:项目-> 属性 -> 配置属性 -> C/C++ -> 代码生成-> 运行时库并将值更改为多线程 (/MT).(这当前源代码 (1.0.71.0) 具有多线程 DLL (/MD) 导致依赖 MSVCR100.dll 的 dll 和DLLImport(和 LoadLibary())到当用户没有它时失败).

Use static linking. In the SQLite.Interop Visual Studio project. Go to this Properties setting: Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library and change the value to Multi-threaded (/MT). (The current source code (1.0.71.0) has Multi-threaded DLL (/MD) which causes the dll to rely on MSVCR100.dll and the DLLImport (and LoadLibary()) to fail when users do not have it).

我相信静态链接应该是已更改,因此它是默认值SQLite.Interop.dll.

I believe static linking should be changed so it is the default for SQLite.Interop.dll.

这篇关于新的 SQLite 混合程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆