Thanks for your feedback. It has helped me to identify the statement that is failing at run time outside the IDE. After the statement:
Dim frm As StackFrame = New StackFrame(1, True)
I try to reference frm.GetFileName.ToString and this aborts with the following:
UOSample1 Unhandled Exception :
at UOSample1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at UOSample1.My.MyApplication.OnCreateMainForm() in C:\Data\CompanyNameVB.NET\Sample Projects\UOSample1\UOSample1\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
[UOSample1]UOSample1.My.MyProject+MyForms.Create__Instance__()
Why would this method work in the IDE but not outside the IDE? Or am I missing something else here?
Thanks.