gpt4 book ai didi

sqlite - SQLite.NET安装程序项目

转载 作者:行者123 更新时间:2023-12-03 14:05:28 25 4
gpt4 key购买 nike

我在Visual Studio 2010中进行安装项目时遇到了一些问题。我正在使用Addin-express来创建与Microsoft Excel相关的程序,并且在其中使用SQLite来构建简单的数据库。我已经阅读了关于stackoverflow的其他答案,但是他们的解决方案对我没有帮助。

我正在使用SQLite.net,可以在http://sqlite.phxsoftware.com上找到它。我无法连接到该网站,因此直接链接到dll是http://sourceforge.net/projects/sqlite-dotnet2/

尽管我运行的是64位Windows 7,但此加载项正在使用32位版本的Microsoft Office Excel,因此我在Visual Studio 2010项目中包括了dll的32位版本。我在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 ----


我曾尝试使用“ Any CPU”和“ x86”平台来构建此项目,但都没有起作用。我尝试使用64位版本的DLL,它给了我badimageformat异常,这使我相信32位版本是要使用的正确版本。我已经将system.data.sqlite.dll既放在我的插件的根文件夹中,又放在excel的根文件夹中,但都没有解决我的问题。尽管我不是经验丰富的.NET程序员,但我完全没有主意,因此我在此处寻求有关如何解决此问题的建议。

谢谢您的意见。

最佳答案

请使用支持最新版本的sqlite和.Net的最新的system.data.sqlite.dll:

http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

关于sqlite - SQLite.NET安装程序项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10039702/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com