C# 引入Sqlite 未能加載文件或程序集「System.Data.SQLite


我的博客 地址:https://www.wenhaofan.com/article/20190501224046

問題

在Visual Studio 中 使用NuGet 經過 install-package system.data.sqlite.x64 安裝了64位的sqlite可是在使用中報以下錯誤sql

System.BadImageFormatException:「未能加載文件或程序集「System.Data.SQLite, Version=1.0.110.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139」或它的某一個依賴項。試圖加載格式不正確的程序。」

解決方法

導航欄選擇項目-》【項目名】屬性 -》 生成 在常規中將目標平臺改成x64,若是你安裝的是32位的sqlitename就選擇 x86orm

相關文章
相關標籤/搜索