我定期得到以下异常:
Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
我使用的是1.0.82.0.版本,在VS2010,OS Win7 64中使用nuget进行安装.
一旦异常开始出现,它就会不断出现 - 在VS内部或外部的调试和发布以及运行应用程序.
停止它的唯一方法是注销和登录.不抛出异常并加载dll.它可以工作几天,但它可以再次破坏.
有没有人见过这样的东西,有没有解决方案呢?
System.Data.SQLite和Microsoft.Data.Sqlite有什么区别?
我知道System.Data.SQLite较旧,并且在Microsoft.Data.Sqlite之后获得了.NETStandard支持,但是现在它们都支持.NETStandard 2。
一个相对于另一个的优点是什么?
我收到此错误消息:
“Microsoft.Data.Sqlite.SqliteConnection”的类型初始值设定项引发异常。
更明确地说,我得到:
Message =“Microsoft.Data.Sqlite.SqliteConnection”的类型初始值设定项引发异常。
内部异常 = System.Exception:您需要调用 SQLitePCL.raw.SetProvider()。如果您使用的是捆绑包,则可以通过调用 SQLitePCL.Batteries.Init() 来完成。在 SQLitePCL.raw.get_Provider() 在 SQLitePCL.raw.sqlite3_win32_set_directory(Int32typ,字符串路径) 在 Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize() 在 Microsoft.Data.Sqlite.SqliteConnection..cctor()
堆栈跟踪 = 位于 Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString) 位于 CartographerYou.MainPage.InsertMapRecord(String mapName, String mapNotes, Int32 PreferredZoomLevel) 位于 CartographerYou.MainPage.btnCre8NewMap_Click(Object sender, RoutedEventArgs e)
这是 StackTrace 中提到的两个方法(事件处理程序和自定义方法):
private async void btnCre8NewMap_Click(object sender, RoutedEventArgs e)
{
try
{
string mapName = string.Empty;
string mapNotes = string.Empty;
int defaultZoomLevel = 1;
ClearLocations();
// Popul8 the cmbx
for (int i = 1; i < 20; i++)
{
cmbxCre8MapZoomLevels.Items.Add(i.ToString());
}
ContentDialogResult result = …Run Code Online (Sandbox Code Playgroud)