Program has stopped working

Some of my customers are getting “Program stopped working error”
It runs fine on my desktop and laptop computers.
Its WPF .net 4.0 application.
Things were fine until just recently for customers.

You need to post more about the error. What OS are people using? .NET Framework 4.0 runs all the way back on Windows XP.

Also log unhandled exceptions with:

AppDomain.CurrentDomain.UnhandledException += UnhandledException;
Dispatcher.UnhandledException += Dispatcher_UnhandledException;

That will help you debug your app in the wild. Also make sure to call “Flush” on your StreamWriter and streams after each write to your log files to avoid loss of data in the logs.

.NET Foundation Website | Blog | Projects | Code of Conduct