VB publish install error

J M 1 Reputation point

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 **************
Assembly Version:
Win32 Version: 4.8.4420.0 built by: NET48REL1LAST_C

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

Assembly Version:
Win32 Version:

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

Assembly Version:
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

Assembly Version:
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

Assembly Version:
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

Assembly Version:
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

Assembly Version:
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

Assembly Version:
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

Assembly Version:
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

Assembly Version:
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

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

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

For example:

<system.windows.forms jitDebugging="true" />

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.

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

2 answers

Sort by: Most helpful
  1. J M 1 Reputation point

    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

    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