1) When starting the application, WPF crashes. No mistakes, I don’t know why.
The key troubleshooting step for actually finding the error is primarily to add additional error handling to app.xaml.
In the App.xaml header add:
<Application DispatcherUnhandledException="App_DispatcherUnhandledException" />
and in your App.xaml.cs application add something like:
void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs args) { log.Fatal("An unexpected application exception occurred", args.Exception); MessageBox.Show("An unexpected exception has occurred. Shutting down the application. Please check the log file for more details.");
After adding this extra debugging, I caught an error:
System.TypeInitializationException: The type initializer for "System.Windows.Media.FontFamily" made an exception. ---> System.ArgumentException: Invalid characters in the path.
Further research, searches, and coffee led to the client machine having a trailing "◻" in the font entry in the registry under
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Fonts
Removing this fraudulent character solved the problem.

See Career Growth Collapse Every WPF Application .
2) The WPF application starts, the window border is displayed, but the content is not displayed. It just freezes (displayed as a "transparent window")
This was another font issue. I first pushed it to fontSize = "16" in Window.xaml, not working on one (and only one) machine on the client site, as if WPF refused to display its 16 (?) Fonts. I deleted the code that determines the font size and it worked ... but as it turned out, it worked only for my login profile. He continued to fail for a colleague's login profile on the same machine computer. I could literally log in as myself, successfully launch it, log off, log in as myself, launch it, and it will fail using the "transparent hanging window". The same car, the same permissions.
As a last resort, I logged in as he did and noticed that he has a custom theme with an extended font. I changed the Windows theme to a classic theme ... and this fixed the problem (?!?). This problem is also related to the font, but I have no absolute root cause. Changing the theme to a standard theme is a temporary solution.