VB publish install error

J M 1 Reputation point
2022-03-09T21:45:03.707+00:00

I create the install and when I run the Setup.exe on a computer, the program starts then stops stating that a file cannot be found. I have copied ALL of the files locally, but it still happens.

Below is the message details I get. Can any one see where its failing? I've chased this for a week.

<message details>
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: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4420.0 built by: NET48REL1LAST_C

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

Factory_Track_Plus
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0

CodeBase: file:///C:/Users/macfarj/AppData/Local/Apps/2.0/PTNLC6Y7.XKQ/791J0RCL.MHZ/fact..tion_12ef137fafee138f_0001.0000_9f0009a09468e339/Factory_Track_Plus.exe

Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.8.4084.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.4360.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.4455.0 built by: NET48REL1LAST_C

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.4400.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.4390.0 built by: NET48REL1LAST_C

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.4190.0 built by: NET48REL1LAST_B

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

Microsoft.Web.WebView2.WinForms
Assembly Version: 1.0.1072.54
Win32 Version: 1.0.1072.54

CodeBase: file:///C:/Users/macfarj/AppData/Local/Apps/2.0/PTNLC6Y7.XKQ/791J0RCL.MHZ/fact..tion_12ef137fafee138f_0001.0000_9f0009a09468e339/Microsoft.Web.WebView2.WinForms.DLL

Microsoft.Web.WebView2.Core
Assembly Version: 1.0.1072.54
Win32 Version: 1.0.1072.54
CodeBase: file:///C:/Users/macfarj/AppData/Local/Apps/2.0/PTNLC6Y7.XKQ/791J0RCL.MHZ/fact..tion_12ef137fafee138f_0001.0000_9f0009a09468e339/Microsoft.Web.WebView2.Core.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.
</message>

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,668 questions
{count} votes

2 answers

Sort by: Most helpful
  1. J M 1 Reputation point
    2022-03-10T03:42:42.283+00:00

    I thought of that. I re-created the original project, just copying the code over then rebuilt the form.
    Still does it. I stated to wonder if it were the location the files are stored, that remote access via the set up would not allow it, but other projects are stored there.

    I will copy the install on to a mem stick and see if that works. Hoping, but not expecting success.

    0 comments No comments

  2. Leon Stanley 96 Reputation points
    2022-03-10T10:53:24.477+00:00

    Ok so asuming you have added these files to your project : - In your Solution Explorer >> right click on [your project name] >> Add >> Existing Item
    . . . there is another step to verify they will be installed to your app's directory
    In your Solution Explorer, click on your added file, then view the properties window below >> Build Action needs to be Content