Ok, here is what I did.
I disabled Enable Application Framework in the Application tab of Project Properties. Using this makes things easier, but much less transparent. I will never use that crutch again!
By using your own Sub Main you can actually see and respond to errors that happen when your form is loading like:
Public MainForm As frmSettings
Public Sub Main()
Try
MainForm = New frmSettings
Catch ex As Exception
Log.WriteToProgressLog("Error new form: " & ex.Message)
End Try
Try
MainForm.Show()
Catch ex As Exception
Log.WriteToProgressLog("Error Showing Form: " & ex.Message)
End Try
Try
Application.Run(MainForm)
Catch ex As Exception
Log.WriteToProgressLog("Error Running App: " & ex.Message)
End Try
End Sub
And you can see the form globally using this. Yeah I know, purists will complain, but my philosophy is: I have zero tolerance for zero tolerance policies. I have even been known to use a goto if it made the code more efficient and easier to read. Anyhoo...
After changing this I was getting an error instantiating the form. Turns out Microsoft.VisualBasic.PowerPacks.Vs.dll component (I have a single line control on my form which needs this apparently) is not part of the .Net 3.5 distribution so you have to include it with your app. What's up with that? And it is not set to copy local by default. WT...? I assumed incorrectly that I only needed to include external dependencies. So much for .Net XCopy installations!