I have a WPF application that\'s crashing once I get it onto machines that do not have a development environment installed-- if this is a dupe, I\'m welcome to closing, but
In addition to Alistair's answer, it's the InnerException that gave me the clues I was looking for:
public partial class App : Application {
void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) {
Exception ex = e.Exception;
Exception ex_inner = ex.InnerException;
string msg = ex.Message + "\n\n" + ex.StackTrace + "\n\n" +
"Inner Exception:\n" + ex_inner.Message + "\n\n" + ex_inner.StackTrace + "\n\n" +
Utils.RegistryVersion();
MessageBox.Show(msg, "Drop Print Batch Application Halted!", MessageBoxButton.OK);
Utils.MailReport(msg);
e.Handled = true;
Application.Current.Shutdown();
}
}