沒法加載 DLL「SQLite.Interop.dll」: 找不到指定的模塊。 (異常來自 HRESULT:0x8007007E)

  近期剛使用SQLite,主要引用的是System.Data.SQLite.dll這個dll,在部署到測試環境時報沒法加載 DLL「SQLite.Interop.dll」: 找不到指定的模塊。 (異常來自 HRESULT:0x8007007E)。html

  

  後上官網查了下,sqlite-netFx40-binary-Win32-2010-1.0.94.0.zip 這個包中的System.Data.SQLite.dll是需用到SQLite.Interop.dll,可是這個dll不是.net版本的沒法直接引用,只能拷貝到文件執行目錄,不過期好時壞,沒法徹底避免報錯。sql

  只能再次搜索,發現sqlite-netFx40-binary-bundle-Win32-2010-1.0.94.0.zip 這個包中的System.Data.SQLite.dll是不須要SQLite.Interop.dll,果斷替換,本機運行無報錯,上傳到測試環境,結果又悲催了,軟件啓動就奔潰退出,這是鬧那樣?post

  研究了下官網的描述: 測試

This binary package features the mixed-mode assembly and contains all the binaries for the x86 version of the System.Data.SQLite 1.0.94.0 (3.8.6) package. The Visual C++ 2010 SP1 runtime for x86 and the .NET Framework 4.0 are required

   比對了下本機和測試環境,還真缺「Visual C++ 2010 SP1 runtime for x86」這個補丁,上微軟官方找到下載地址,下載安裝到測試環境,終於再也不報錯了。ui

相關文章
相關標籤/搜索