【发布时间】:2016-10-10 15:42:01
【问题描述】:
我将我认为必要的 SQLite(和 sqlite-net)包添加到我的应用程序中。但是,在运行它时,我得到了一个例外:
System.DllNotFoundException 未被用户代码处理 H结果=-2146233052 消息=无法加载 DLL 'sqlite3':找不到指定的模块。 (来自
的例外我安装了以下 SQLite 包:
缺少什么?
更新
我尝试了 ajawad987 的建议,但仍然得到相同的运行时错误,即使我有这个:
...还有这个:
更新 2
这个运行时异常发生的地方(在 SQLite.cs 中)对我来说似乎很奇怪:
如果银光 || USE_CSHARP_SQLITE
var r = SQLite3.Open (databasePath, out handle, (int)openFlags, IntPtr.Zero);
其他
// open using the byte[]
// in the case where the path may include Unicode
// force open to using UTF-8 using sqlite3_open_v2
var databasePathAsBytes = GetNullTerminatedUtf8 (DatabasePath);
var r = SQLite3.Open (databasePathAsBytes, out handle, (int) openFlags, IntPtr.Zero);
endif
但我 am 使用 C#,那么为什么失败的行甚至还在运行呢? (它在“else”块中失败)?
【问题讨论】:
标签: wpf sqlite visual-studio-2013 nugetgallery runtime-packages