I made a WPF program that works in the VIsual studio when run. I made an installer for my program with Visual Installer Projects 2017. At one part the program crashes and I get the following dialog:
An unhandled Microsoft.NET Framework exception occured in Program1.exe [10204].
My catch block looks like this
Dispatcher.Invoke(new Action(() =>
{
EnableContent();
}));
}
catch (AggregateException e)
{
MessageBox.Show(e.ToString());
Dispatcher.Invoke(new Action(() =>
{
UpdateLoadMsg("No internet connection.", MsgType.FAIL);
}));
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
Dispatcher.Invoke(new Action(() =>
{
UpdateLoadMsg("Something went wrong.", MsgType.FAIL);
}));
}
Messagebox is never showed! apparently the exception isn't being catched. How to debug this?
I found the causing exception by looking at the system logs http://www.dummies.com/computers/operating-systems/windows-10/how-to-use-event-viewer-in-windows-10/ .
The exception that was being thrown was a FileNotFoundException. Setting buildaction = embedded resource wasn't enough, I had to add the file as additional installation file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With