Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have used the Setup Project before and it worked on a project that did not have System.Data.SQLite.Core installed So Now I am trying to create the EXE and MSI files using the same steps.

Solution Explore Looks Like this
NoteSetup
Detected Dependencies
MS Net Framework
System.Data.SQLite.dll
System.Net.Http.dll
Primary output from Notebook (Active)
Primary output from Notebook (Active)
Primary output from Notebook (Active)
an.ico

I am suing a W 7 64 bit machine and I am guessing for some reason VS 2019 is a 32 bit program ? I am trying to do the Builds as x64

I will post the ERROR log file
My Package Management is Package Reference
Allow NuGet to download missing packages is UN-checked I have tried BUILD with this checked and UN-checked as well as package.Config per this SO Post
installation - How to make Visual Studio Setup Project detect nuget dependencies consistent with build? - Stack Overflow[^]

Here is the ERROR Log File
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** 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'
at Notebook.frmStart.makeDB()
at Notebook.frmStart.btnCreate_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4069.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Notebook
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Dwight/Desktop/Notebook.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4110.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4042.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

configuration
system.windows.forms jitDebugging="true"
configuration

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

What I have tried:

I have tried more to follow same Build steps that worked for project without SQLite
I have this Import statement in all forms
Imports System.Data.SQLite
Posted
Updated 4-Sep-20 7:13am

Quote:
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.

You don't the version of the assembly that is referenced in your project.

Find the assembly version that is present on the system (assuming things are in place installed). Notice the difference. Now, once you have located the assembly, use this in your project as a reference instead of the current version v1.0.113.0

Imports is using the namespace and the issue is more related to locating the assembly first.
 
Share this answer
 
Comments
Choroid 23-Aug-20 12:52pm    
@SandeepMewara Little confused assembly version on the system How to Find SQLite on system I have never used it except in VS 2019 I guess a global search of Drive C Holly Crap SQLite is every where I have perhaps a Kotlin project that uses it I also have DB Browser that uses it AND Adobe Reader ? Need better search term like SQLite dll ?
Sandeep Mewara 23-Aug-20 13:19pm    
Well, if its about the Visual studio install, you should find somewhere in Program Files.

Alternate, try this first:
1. Remove the current reference if any.
2. Use Buget: https://www.nuget.org/packages/System.Data.SQLite and then refer the version 1.0.113 from there. This should solve right away.
Choroid 23-Aug-20 13:57pm    
See My Next two comments
Choroid 23-Aug-20 13:42pm    
@SandeepMewara so VS 2019 has SQLite.Interop.dll v 1.0.109.0 under C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\PrivateAssemblies\x86 and x64 What do I need to change ? And Where do I need to change OTHER Interop.dll have for System.Data.SQLite.Core have v1.0.113.0
Choroid 23-Aug-20 13:45pm    
@SandeepMewara I tried that alternative using System.Data.SQLite NO CORE no results same ERROR See my comment above
After 3 weeks of back and forth with Microsoft Developer Community and a very intense exchange of files and offered solutions from MDC that did not work
I have dusted off old brain cells from my days with VB 6 and what we called dll HELL

I Opened up Inno Setup current version and wrote a Setup.iss file YES
I now have a working EXE file for my Visual Studio 2019 WinForms project developed on a Windows 7 64 bit machine
Is this a Solution Yes and No
Yes it works and accomplishes the task
No IMHO MS has always had issues with installers
I guess that is why there are so many third party installers FREE and PAID

Relevant Code Below

[Files]
Source: "C:\Users\Dwight\source\repos\TestDiary\TestDiary\bin\Debug\TestDiary.exe"; DestDir: "{app}";Flags: ignoreversion
Source: "C:\Users\Dwight\source\repos\TestDiary\TestDiary\bin\Debug\x64\*"; DestDir: "{app}";Flags: ignoreversion
Source: "C:\Users\Dwight\source\repos\TestDiary\TestDiary\bin\Debug\x86\*"; DestDir: "{app}";Flags: ignoreversion
Source:"C:\Users\Dwight\source\repos\TestDiary\TestDiary\bin\Debug\System.Data.SQLite.dll";DestDir: "{app}";Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900