Code in Program.cs
[STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try
Because in RELEASE mode at the moment the message box have to be shown yuo're appication is going to be "dead" and you can not stop it by showing MessageBox. In DEBUG mode VS cares about that and breaks on the line that throws an exception.
Regards.