【问题标题】:SQLite3.dll cannot be used in C# application in VS2013 ON WIN 7SQLite3.dll 无法在 VS2013 ON WIN 7 的 C# 应用程序中使用
【发布时间】:2023-04-06 14:11:01
【问题描述】:

我需要在 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)

然后,我从 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'

有什么建议吗?谢谢。

【问题讨论】:

  • 写得很好的问题 - 欢迎来到 SO :)
  • 问题不在于 SQLite。问题似乎是一个叫做Devart dotConnect 的东西,检测到你有 SQLite,但它似乎需要某种特殊许可证。
  • 需要什么样的许可证?如何得到它?谢谢

标签: c# visual-studio sqlite


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2018-09-06
    • 1970-01-01
    • 1970-01-01
    • 2012-04-19
    • 1970-01-01
    • 2016-05-28
    • 2012-08-26
    • 2012-04-09
    • 2011-09-20
    相关资源
    最近更新 更多