I was getting the error: MyApplication.exe has encountered a problem and needs to close. We are sorry for the inconvenience, but I was not getting any unhandled exceptions in my “HandleGlobalExceptions” event:
AppDomain.CurrentDomain.UnhandledException += HandleGlobalExceptions;
After setting some MessageBox.Show("Step 1") statements, I could see that the application was entering an endless loop. The code was accessing a property get in the property get it self.
This was the cause of the error message. So no exception will be thrown, but the .net framework simply shows you the message:
MyApplication.exe has encountered a problem and needs to close. We are sorry for the inconvenience