0

我对 sqlite 1.0.80.0(sqlite-netFx40-setup-bundle-x86-2010-1.0.80.0.exe)有一个奇怪的问题。

首先,我在 Visual Studio 2010 SP1 中安装了 sqlite 1.0.66。我将其卸载以安装最新版本的 system.data.sqlite(1.0.80.0)。安装顺利,没有错误。我制作了一个项目(控制台应用程序)并创建了一个实体框架对象(.edmx)文件。我可以轻松连接 sqlite 文件并从 sqlite 数据库生成模型。

当我尝试运行包含简单 LINQ 请求以从数据库获取某些内容的应用程序时,问题就开始了。我收到以下错误:

System.Security.VerificationException :操作可能会破坏运行时的稳定性。

我尝试了无数的事情,看看我是否能解决这个问题。但到目前为止还没有解决方案。我尝试使用 sql server 2008,它工作正常。所以 system.data.sqlite 有问题还是我做错了什么?

为了尝试一切,我在 Visual Studio 2010 SP1 上安装了 sqlite 1.0.66,它适用于同一个项目!

有人知道原因吗?

4

1 回答 1

0

Maybe it has something to do with using the bundle package. I just did some research on what is the right package/distribution for me and read through this article.

"All the "bundle" packages contain the "System.Data.SQLite.dll" mixed-mode assembly. These packages should only be used in cases where the assembly binary must be deployed to the Global Assembly Cache for some reason (e.g. to support some legacy application on customer machines)."

further...

"Using the Global Assembly Cache (at all) is not recommended; therefore, the "bundle" packages should be avoided unless deemed absolutely necessary."

So giving the XCOPY deployment in conjunction with the native library pre-loading feature a try wouldn't hurt.

于 2012-12-07T09:02:30.073 回答