0
votes

I have used Setup Project before with no issue the project did not have SQLite DB as a dependency
I am now trying to make a EXE or msi file for a project that has SQLite included as System.Data.SQLite.Core and the project is a WinForms with a WPF TextBox with this code below

    Public Sub LoadTB()
    Dim tb As Windows.Controls.TextBox = New Windows.Controls.TextBox()
    ElementHost1.Child = tb
    tb.SpellCheck.IsEnabled = True

    AddHandler tb.TextChanged, AddressOf tb_TextChanged

    tb.TextWrapping = Windows.TextWrapping.Wrap
    tb.AcceptsReturn = CBool("True")
End Sub

Here is part of the file file
************** Exception Text ************** System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The system cannot find the file specified. File name: 'System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139'

A picture is worth a 1000 words
Here is the issue the System.Data.SQLite.dll in the project is version 1.0.133.0
The NuGet package System.Data.SQLite.Core is version 1.0.113.1
Question what do I change and Where do I change it
YES I have tried using System.Data.SQLite from NuGet NO Luck

Project dll Version

NuGet dll Version

2
I just searched my registry for Fusion!EnableLog and Fusion!Enable NO RESULTS FWIWVector
I also see this in my log file why is everything System 32 I am running a 64 bit W 7 Win32 Version: 14.8.3761.0 built by: NET48REL1Vector
OK I created a EXE and MSI installer with a project that has the WPF TextBox in a WinForms project but the PROJECT does not have an ICON or the System.Data.SQLite.Core added to the project and it works THIS would tell me the issue is with the SQLite I am not including it SO How to INCLUDE this NuGet packageVector

2 Answers

1
votes

After continuing to try and use the Setup Project in Visual Studio 2019 to create both EXE & MSI installers I have found a FIX to the issue Exception Text ERROR as explained in my question above
Create your Setup Project with the Normal Steps
After you navigate to the Setup folder and open the Debug folder and click the setup.exe file the next Step is as follows YES it is Odd and not ideal compared to using Inno Setup but if you do not want to learn how to use Inno Setup this works. Why it is necessary is beyond me

OK now navigate to the folder where your application EXE file is located
Add the following two folders from your project X64 & x86 folders they are in the source folder for VS 2019 for your project

One more detail DO NOT use the desktop icon created by setup.exe
Click the AppName.exe in the Application Folder to run the application
Yes It is a different app than the app in the question
Here are two screen shots that add more clarity to the issue

Application Folder Desktop

0
votes

Partial answer I say Partial because I do not know how to implement all the steps
So If someone would be kind enough to explain how to apply this fix that would be nice
As well if this is not the ideal way to correct the issue please comment

The ERROR as I see it is that SQLite.Interop.dll v 1.0.109.0 under
C:\Program.Files(x86)\MicrosoftVisualStudio\2019\Community\Common7\IDE\PrivateAssemblies\x86
as well as x64 and System,Data.SQLite.Core is v 1.0.113.0 Do NOT match

So applying the steps as described in this SO Post should solve the problem? LINK to SO Post