SQLite.NET Installer Project

1

I am having some issues making a setup project in visual studio 2010. I am using Addin-express to make a program associated with Microsoft Excel and I am using in it SQLite for a simple database. I have read other answers on stackoverflow but their solutions have not aided me.

I am using SQLite.net which can be found at http://sqlite.phxsoftware.com. I have not been able to connect to that website so the direct link to the dll is http://sourceforge.net/projects/sqlite-dotnet2/

This addin is using the 32 bit version of Microsoft Office Excel, though I am running 64 bit windows 7, and so I have included the 32 bit version of the dll in the Visual Studio 2010 project. I have had no problems running the 32 bit dll in Visual Studio debugging and so I have included that same dll in my Visual Studio install project. However, when I run this install program on my virtual machine (also Windows 7 64 bit) I receive the following error and stack trace:

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 ----

I have tried building this project both with the "Any CPU" and "x86" platforms and neither has worked. I have tried using the 64 bit version of the DLL and it has given me the badimageformat exception which leads me to believe that the 32 bit version is the correct version to use. I have placed the system.data.sqlite.dll both in the root folder for my addin and in the root folder for excel and neither has resolved my issue. I am completely out of ideas, though I am an inexperienced .NET programmer so I am looking for advice here on how to resolve this issue.

Thank you for your input.

sqlite

1 Answer

2

Please use this far more up-to-date system.data.sqlite.dll that supports the latest versions of sqlite and .Net:

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

answered on Stack Overflow Apr 6, 2012 by (unknown user)

User contributions licensed under CC BY-SA 3.0