none
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? 

    Monday, December 12, 2011 11:01 AM

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.

    Wednesday, December 14, 2011 5:11 PM

All replies

  • Handle DispatcherUnhandledException event in Application.xaml to get cause and location of the error.

    XAML File

    <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" />
    
    Code behind
    public partial class App : Application
    {
        void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
             MessageBox.Show(e.Exception.ToString());
        }
    }
    


     


    Gaurav Khanna | Microsoft VB.NET MVP
    Monday, December 12, 2011 5:51 PM
  • 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
    Wednesday, December 14, 2011 6:44 AM
    Moderator
  • 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.

    Wednesday, December 14, 2011 5:11 PM
  • This is magic!  solved all my problems! thank you! 

    Saturday, September 20, 2014 4:57 PM