When I ran my C# WinForms executable outside of the Visual Studio IDE for the very first time, I received the following dialog:
"<Application> has stopped working, Windows can check online..."
So I attached to the process using Visual Studio's Attach to Process, which showed that the program had suspended within InitializeComponent()
(but did not provide further clues).
I edited the application, placed a try/catch block around the aforementioned code, which allowed me to print the following MessageBox
output:
As you can see, this showed that the application is not able to find a DLL it needs.
My question: Could I have achieved this result without modifying the application (that is, without the try/catch block printing out the specifics)? Could Visual Studio Attach to Process functionality guide me to the specific problem being the missing DLL? If so, how?