繁体   English   中英

SQLite 的 dotConnect 包不适用于 VS2013 中的 64 位 C# 项目?

[英]the package of dotConnect for SQLite does not work for 64 bits C# project in VS2013?

这是来自的后续问题

  http://stackoverflow.com/questions/36166266/sqlite3-dll-cannot-be-used-in-c-sharp-application-in-vs2013-on-win-7/36169278#36169278

我安装了 dotConnect.Express.for.SQLite 从

https://www.nuget.org/packages/dotConnect.Express.for.SQLite/

现在,对于 32 位的 C# 项目,它起作用了。 但是,对于 x64,我收到错误:

 An unhandled exception of type 'System.IO.FileLoadException' occurred in XMR.UserModel.dll

  Additional information: Could not load file or assembly 'Devart.Data.SQLite, Version=5.2.457.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

似乎 .net 需要 x64 版本,但安装的“dotConnect”是 32 位的?

有什么建议 ?

用于 SQLite 程序集的 dotConnect 是使用 /platform:anycpu 选项构建的。 因此,您可以在任何平台(x86 或 x64)上使用提供程序的程序集。 有关详细信息,请参阅http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx

但是,您需要确保您使用的是兼容版本的引擎库 sqlite3.dll。 在安装用于 SQLite 的桌面 dotConnect 期间部署了适当容量的引擎库版本。 要获得 sqlite3.dll 的两个版本(x86 和 x64),请从https://www.devart.com/dotconnect/sqlite/download.html为 SQLite Express 安装桌面 dotConnect。 默认情况下,安装会将这些文件放在这里:

  • C:\\Program Files (x86)\\Devart\\dotConnect\\SQLite\\sqlite3.dll

  • C:\\Program Files (x86)\\Devart\\dotConnect\\SQLite\\x64\\sqlite3.dll

部署时,创建一个名为“x86”(不带引号)或“x64”(不带引号)的文件夹,并将其放置在包含应用程序程序集的文件夹中。 它是 dotConnect for SQLite 查找 sqlite3.dll 的第一个位置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM