MANASYS Jazz is a Windows Forms application with this code structure Private Sub Startup_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Try ... Dim Workbench As New JazzWorkbench JazzWorkbench = Workbench Workbench.AutoOpen = My.Settings.AutoOpen Workbench.ShowDialog() CloseJazzLog() 'Does nothing unless open Me.Close() Catch ex As Exception lblError.Text = ex.Message WriteJazzLog("Error:" & ex.Message) ... CloseJazzLog() End Try End Sub
All the real logic is in JazzWorkbench, the point of Startup is that it runs JazzWorkbench within a Try/Catch so that if there is an error it is caught and reported. There is a Startup Form that is displayed when an error is trapped. I'd just changed this form to add a button to make it easy for users to report errors to us.
This all works perfectly when I run the development version from Visual Studio. Here I've started MANASYS Jazz and clicked a [Test] button that forces an error. The Startup form is displayed, and I can click [Report Issue to Jazz Developers] to report the error: -
So I published a new build to make the new [Report Issue to Jazz Developers] feature available. However when I repeat the test with the published version, the dialog is different. The error is caught and reported with this form
Clicking [Details] shows the same call stack as before, although as expected it does not include line numbers, but this is not my revised Startup form with the [Report Issue to Jazz Developers] button.
Is there a project option that I should change to ensure that Startup.vb will catch the error in the published version as it does in test? (This is the first time in 15 years of working with VB.NET that I get different results with the published version)
The project is written in VB.NET with .NET Framework 4.7.2. It is published as a ClickOnce application.

