我在我的应用程序中添加了我认为必要的 SQLite(和 sqlite-net)包。但是,在运行它时,我遇到了一个异常:
System.DllNotFoundException 未被用户代码处理 HResult=-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);
万一
但是我使用的是C#,那么为什么失败的行甚至还在运行呢?(它在“其他”块中失败)?