SQLite3.dll 不能在 VS2013 ON WIN 7 中的 C# 应用程序中使用 [英] SQLite3.dll cannot be used in C# application in VS2013 ON WIN 7

查看:45
本文介绍了SQLite3.dll 不能在 VS2013 ON WIN 7 中的 C# 应用程序中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I need to access SQLite3.dll for my application (x64) C# in VS2013 on win7.

来自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:

So, I installed System.Data.SQLite.x64 from package manager:

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 中添加了它作为参考.但是,我得到了错误:

I added it as a reference in 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)

然后,我从http://www.sqlite.org/download.html

我将 Sqlite3.dll 和 Sqlite3.def 放在 bin/Debug 并将其添加为内容文件并将其复制到输出"属性更改为始终复制",但出现错误.

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.

 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 相同的操作.得到同样的错误:

Then, I downloaded Sqlite3.dll (x86) and did the same thing as x64. got the same error:

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

链接也无济于事,无法加载文件或程序集System.Data.SQLite"

有什么建议吗?谢谢.

推荐答案

它似乎引用了这个 这里该程序集似乎包含来自上述链接的嵌入代码,并且需要许可证才能工作.

It seems to be referencing this here It appears that the assembly contains embedded code from the above link and it requires a licence to work.

这篇关于SQLite3.dll 不能在 VS2013 ON WIN 7 中的 C# 应用程序中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆