我需要在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'
有什么建议吗?感谢。