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 having an unhandled exception event handler that logs the stack trace, it is also useful to look at the crash dumps being generated on the repro machine. You mentioned it's Windows 7, so you can look for corresponding crash dumps in the following ways:
Control Panel -> All Control Panel Items -> Action Center -> "View problems to report" link underneath the Maintenance/"Check for solutions to unreported problems" area. This brings up a list of applications that have crashed and you can drill down into them to find the dump files and information. Look for the "View a temporary copy of these files" link in the bottom left of the problem technical details. This will extract the dump files and show them to you in an explorer window.
cd /d %ProgramData%\Microsoft\Windows\WER.
WER seems to keep it's crash dumps underneath that directory, so what I do is a dir /s/b for part of the app name that I know will be there. For example, I made a on purpose crashy app that i called crashyapp.exe:
C:\ProgramData\Microsoft\Windows\WER>dir /s/b *crashy* C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_crashyapp.exe_56f8d710d72e31d822d6b895c5c43a18d34acfa1_cab_2823e614That directory contains the hdmp and mdmp files for the crash. Time to get a debugger attached!