Bruie
Bruie

Reputation: 1235

WPF Deployment Issue

I have created a WPF application and deployed it to a location on my PC. I have installed it fine but when I open the applicaiton link I keep getting an error message saying the application has stopped working. I am running this on the same PC that I created the application on.

Sorry if this is a silly and really easy fix but I am new to deploying applications so may have missed something out.

thank you

Upvotes: 0

Views: 110

Answers (2)

icebat
icebat

Reputation: 4774

It`s usually a good idea to catch such unhandled exceptions and show some notification to user. To do so in WPF app you can add event handlers to DispatcherUnhandledException and AppDomain.CurrentDomain.UnhandledException in App class constructor. This will allow you to show exception details in MessageBox or log them by any other means.

Upvotes: 1

Dana Cartwright
Dana Cartwright

Reputation: 1576

That dialog invariably means there was an unhandled exception in your application and it isn't particular to WPF. There could be a lot of different issues that cause it.

If you start the application from the command line instead of double-clicking on it in the explorer, then Windows will dump the exception details to the command line after the program crashes. I would try that first and see if it's not something simple like you missed a DLL in your installer.

Upvotes: 1

Related Questions