I am trying to install and run my first WPF application and am having a few issues. I have built a setup project and everything appears to be installing correctly, all my third party dll's are copied over, directories are created, etc... When I try to run the app, it just bombs immediately with the following error:
Faulting application name: app.exe, version: 126.96.36.199, time stamp: 0x4f8343f3 Faulting module name: KERNELBASE.dll, version: 6.1.7600.16850, time stamp: 0x4e211485 Exception code: 0xe0434352 Fault offset: 0x0000b9bc Faulting process id: 0xdec Faulting application start time: 0x01cd168e7b8a64fc Faulting application path: C:\Program Files (x86)\Some Dir\Some APP\app.exe Faulting module path: C:\Windows\syswow64\KERNELBASE.dll Report Id: bad81009-8281-11e1-93ec-f4501845bd18
How do I go about debugging this?? I have wrapped the InitializeComponent() in a try/catch but I'm getting nothing?
All that being said, if I copy the contents of the debug directory to the program files directory on the same pc in which I am trying to install the app and then run the exe, everything works just fine?? What do I need to do differently in my setup project??
I had the exact same problem, hopefully you have fixed it by now and so I am writing this for others redirected here. I was installing the project via an MSI executable, but the problem is, one of the file inside my project (not the installer project) was marked as "Copy Always" under its "Copy to output directory" in its properties. This project was a dependency for my MSI project but the "Copy to output" files are not being copied in the MSI file, you have to manually each one of those file inside the MSI project also. Hopefully this post made sense!
Edit: This is probably why copying files from your debug folder works, you are including the file that has previously not been copied by the MSI itself.
Ran into the same problem, but in my case I had an exception triggered in the constructor of pages referenced from the main window. Bad coding, but mentioning it here because it's not always obvious that WPF pages will be constructed before the main window is rendered.
User contributions licensed under CC BY-SA 3.0