我有Visual Studio 2010中的一些問題做一個安裝項目我使用外接快車,使與Microsoft Excel相關聯的程序,我使用它SQLite,讓一個簡單的數據庫。我已經閱讀了其他答案,但他們的解決方案並沒有幫助我。SQLite.NET安裝工程
我使用SQLite.net可在http://sqlite.phxsoftware.com找到。我一直無法連接到該網站,所以直接鏈接到該DLL是http://sourceforge.net/projects/sqlite-dotnet2/
此插件是使用Microsoft Office Excel的32位版本,雖然我運行64位Windows 7,所以我已包括Visual Studio 2010項目中的32位版本的dll。我在Visual Studio調試中運行32位dll時沒有問題,所以我在Visual Studio安裝項目中包含了相同的dll。然而,當我運行此我的虛擬機上安裝程序(也是Windows 7 64位),我收到以下錯誤和堆棧跟蹤:
Detailed technical information follows:
---
(Inner Exception)
(Inner Exception)
Date and Time: 4/5/2012 7:24:52 PM
Machine Name: TOM-PC
IP Address: --------------------
Current User: Tom-PC\Tom
Application Domain: C:\Program Files (x86)\Fintools\Fintools XL\
Assembly Codebase: file:///C:/Program Files (x86)/Fintools/Fintools XL/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=6.5.3057.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.5.3057.2005
Exception Source:
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Failed to load the runtime. (Exception from HRESULT: 0x80131700)
Exception Target Site: Object reference not set to an instance of an object.
---- Stack Trace ----
(Outer Exception)
Date and Time: 4/5/2012 7:24:52 PM
Machine Name: TOM-PC
IP Address: -------------------
Current User: Tom-PC\Tom
Application Domain: C:\Program Files (x86)\Fintools\Fintools XL\
Assembly Codebase: file:///C:/Program Files (x86)/Fintools/Fintools XL/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=6.5.3057.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.5.3057.2005
Exception Source: COMWizards
Exception Type: System.IO.FileLoadException
Exception Message: Could not load file or assembly 'System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. Failed to load the runtime. (Exception from HRESULT: 0x80131700)
Exception Target Site: GetDataTable
---- Stack Trace ----
COMWizards.SQLiteDatabase.GetDataTable(sql As String)
AddinExpress.MSO.2005.DLL: N 00000 (0x0) JIT
COMWizards.frmImpliedForwardRate.GetMostRecentDate(strDataTableName As String)
AddinExpress.MSO.2005.DLL: N 0020 (0x14) IL
COMWizards.frmImpliedForwardRate..ctor(appExcel As _Application, Path As String)
AddinExpress.MSO.2005.DLL: N 0110 (0x6E) IL
COMUI.AddinModule.adxIFRWiz_OnClick(sender As Object, control As IRibbonControl, pressed As Boolean)
AddinExpress.MSO.2005.DLL: N 0007 (0x7) IL
AddinExpress.MSO.ADXRibbonButton.DoInternalAction(e As ADXRibbonOnActionEventArgs)
AddinExpress.MSO.2005.DLL: N 0035 (0x23) IL
(Outer Exception)
Date and Time: 4/5/2012 7:24:52 PM
Machine Name: TOM-PC
IP Address: ----------------------
Current User: Tom-PC\Tom
Application Domain: C:\Program Files (x86)\Fintools\Fintools XL\
Assembly Codebase: file:///C:/Program Files (x86)/Fintools/Fintools XL/AddinExpress.MSO.2005.DLL
Assembly Full Name: AddinExpress.MSO.2005, Version=6.5.3057.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.5.3057.2005
Exception Source:
Exception Type: AddinExpress.MSO.ADXExternalException
Exception Message: An error has occured in the code of the add-in.
Exception Target Site: Object reference not set to an instance of an object.
---- Stack Trace ----
我試圖建立這個項目既與「任何CPU」和「 x86「平臺,而且都沒有工作。我已經使用DLL的64位版本的嘗試,它給了我badimageformat例外,這使我相信,32位版本使用正確的版本。我已經放在system.data.sqlite.dll都在我的插件的根文件夾,並在Excel的根文件夾並沒有解決了我的問題。我完全沒有想法,雖然我是一個沒有經驗的.NET程序員,所以我在這裏尋找關於如何解決這個問題的建議。
謝謝您的輸入。
這解決了它。謝謝。 – 2012-04-06 20:49:12