2012-04-06 88 views
1

我有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程序员,所以我在这里寻找关于如何解决这个问题的建议。

谢谢您的输入。

回答