简体   繁体   English

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

[英]SQLite3.dll cannot be used in C# application in VS2013 ON WIN 7

I need to access SQLite3.dll for my application (x64) C# in VS2013 on win7. 我需要在win7上的VS2013中为我的应用程序(x64)C#访问SQLite3.dll。

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

I see that 我看到

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

So, I installed System.Data.SQLite.x64 from package manager: 因此,我从程序包管理器安装了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'.

I added it as a reference in VS2013. 我在VS2013中添加了它作为参考。 But, I got error: 但是,我得到了错误:

  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)

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

I put Sqlite3.dll and Sqlite3.def at bin/Debug and added it as a content file and changed its property of "copy to output" to "copy always" but I got error. 我将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

Then, I downloaded Sqlite3.dll (x86) and did the same thing as x64. 然后,我下载了Sqlite3.dll(x86),并执行了与x64相同的操作。 got the same error: 有同样的错误:

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

The link does not help either, Could not load file or assembly 'System.Data.SQLite' 链接也无济于事, 无法加载文件或程序集'System.Data.SQLite'

Any suggestions ? 有什么建议么 ? Thanks. 谢谢。

这似乎是参考该位置看起来,集包含从上面的链接嵌入的代码,它需要一个许可证工作。

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

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