System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll?
Problem solved! I'm using Ctrl + Alt + E to open Exception Window, and I checked all throw checkbox. So the debuger can stop at the exactly the error code.
This is not a problem with XAML. The error message is saying that it tried to create an instance of DVRClientInterface.MainWindow
and your constructor threw an exception.
You will need to look at the "Inner Exception" property to determine the underlying cause. It could be quite literally anything, but should provide direction.
An example would be that if you are connecting to a database in the constructor for your window, and for some reason that database is unavailable, the inner exception may be a TimeoutException
or a SqlException
or any other exception thrown by your database code.
If you are throwing exceptions in static constructors, the exception could be generated from any class referenced by the MainWindow
. Class initializers are also run, if any MainWindow
fields are calling a method which may throw.