SQLite3.dll不能在VS2013 ON WIN 7中的C#应用​​程序中使用

时间:2016-03-22 22:15:25

标签: c# visual-studio sqlite

我需要在win7上的VS2013中为我的应用程序(x64)C#访问SQLite3.dll。

SQLite: sqlite3.dll vs System.Data.SQLite.dll?

我明白了

 "The sqlite3.dll is unmanaged code containing the databae engine itself and it is embedded as resource inside the managed System.Data.SQLite assembly. "

所以,我从包管理器安装了System.Data.SQLite.x64:

PM> Install-Package System.Data.SQLite.x64
Attempting to resolve dependency 'System.Data.SQLite.Linq (≥ 1.0.99.0)'.
Attempting to resolve dependency 'System.Data.SQLite.EF6 (≥ 1.0.99.0)'.
Attempting to resolve dependency 'EntityFramework (≥ 6.0.0.0)'.
'System.Data.SQLite.x64 1.0.99.0' already installed.
My_project already has a reference to 'System.Data.SQLite.x64 1.0.99.0'.

我在VS2013中添加了它作为参考。 但是,我收到了错误:

  An unhandled exception of type 'System.DllNotFoundException' occurred in Devart.Data.SQLite.dll

 Additional information: Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

然后,我从中下载了Sqlite3.dll(x64) http://www.sqlite.org/download.html

我将Sqlite3.dll和Sqlite3.def放在bin / Debug中并将其添加为内容文件,并将其属性更改为"复制到输出"总是"复制"但我得到了错误。

 An unhandled exception of type 'Devart.Data.SQLite.SQLiteException' occurred in Devart.Data.SQLite.dll

 Additional information: Assembly that contains embedded dotConnect for SQLite license cannot be used with this application: my_app.exe

然后,我下载了Sqlite3.dll(x86)并做了与x64相同的事情。得到了同样的错误:

 Additional information: Assembly that contains embedded dotConnect for SQLite license cannot be used with this application: my_app.exe. 

该链接也无济于事, Could not load file or assembly 'System.Data.SQLite'

有什么建议吗?感谢。

1 个答案:

答案 0 :(得分:0)

似乎引用了此here 程序集似乎包含来自上述链接的嵌入代码,并且需要许可证才能工作。