I have a .NET Framework WPF app that I've installed on a VM.
(Installer built with WiX.)
If I try to launch it, it fails without ever showing any UI.
From the Event Viewer I can see that the problem is a FileNotFoundException
Application: MyApp.exe Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileNotFoundException at MyApp.App.OnStartup(System.Windows.StartupEventArgs) ...
It runs OK on my development system, but with the full VS development environment, and third party libraries installed, I'm not surprised.
A second app that's installed together with it, works fine.
How can I find out which
file is missing?
What I have tried:
I tried wrapping the entire body of the MyApp.App.OnStartup() in a try-catch, and writing a file with the exception info in the catch.
It never wrote the file.
I tried using System.Diagnostics.Trace.WriteLine at the beginning of the OnStartup(), and running DbgView as admin while launching the app.
I didn't get any messages.
I even tried to write a file at the entry to the OnStartup().