Answered by:
c#, wpf 4.0 EventType : clr20r3 P9 : system.windows.markup.xamlparse

Question
-
Hi.
I've created a wpf 4.0 app with c# and I have this problem.
When i debug and run my app throug vs2010, there is no problem.
But if i try to run the .exe file, it crashes, and the error report is
EventType : clr20r3 P1 : application.exe P2 : 1.0.0.0
P3 : 4ee325f2 P4 : mscorlib P5 : 4.0.0.0 P6 : 4e181ae3 P7 : 41ed
P8 : 460 P9 : system.windows.markup.xamlparse
What is going wrong?
Answers
-
I found solution to my problem
I went to Debug --> Exceptions, added System.Windows.Markup.XamlParseException and checked "Throw".
The problem was at the FileSystemWatcher, that I have to my app.
Khanna thanks for your suggestion, it helped me to another problem that I had.
- Marked as answer by Annabella LuoModerator Friday, December 16, 2011 4:53 AM
All replies
-
Handle DispatcherUnhandledException event in Application.xaml to get cause and location of the error.
XAML File
Code behind<Application x:Class="DemoApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml" DispatcherUnhandledException="App_DispatcherUnhandledException" />
public partial class App : Application { void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { MessageBox.Show(e.Exception.ToString()); } }
Gaurav Khanna | Microsoft VB.NET MVP -
Hi Sgkin,
According to your description, I understand your application crashed when run the .exe file.
Khanna's suggestion is good.
How is the things? Do you have find the root cause of your issue as what Khanna said?
Please let me know the result of your trouble shooting at your convenience.
Have a nice day.
Annabella Luo[MSFT]
MSDN Community Support | Feedback to us
-
I found solution to my problem
I went to Debug --> Exceptions, added System.Windows.Markup.XamlParseException and checked "Throw".
The problem was at the FileSystemWatcher, that I have to my app.
Khanna thanks for your suggestion, it helped me to another problem that I had.
- Marked as answer by Annabella LuoModerator Friday, December 16, 2011 4:53 AM
-