开发者

Error message while runing a C# application in Windows 7, which previously worked under Windows Vista

开发者 https://www.devze.com 2023-03-16 16:19 出处:网络
What does this kind of an error message mean? I have a C# form application, and it compiled well under Windows Vista, when i tried to run it under Windows 7 i get the following message开发者_Go百科. A

What does this kind of an error message mean? I have a C# form application, and it compiled well under Windows Vista, when i tried to run it under Windows 7 i get the following message开发者_Go百科. Any clue what caused this? I used Visual Studio 2008 to develop this application

Description:    
  Stopped working

Problem signature:    
  Problem Event Name:   CLR20r3    
  Problem Signature 01: matrium.exe    
  Problem Signature 02: 1.0.0.0    
  Problem Signature 03: 4e0c494c    
  Problem Signature 04: System    
  Problem Signature 05: 2.0.0.0    
  Problem Signature 06: 4a275e22    
  Problem Signature 07: 3a97    
  Problem Signature 08: 394    
  Problem Signature 09: System.ComponentModel.Win32    
  Locale ID:    10313


CLR20r3 is a pretty generic error message and doesn't really tell us anything useful about what might be going wrong.

Your best bet here is to hook into the AppDomain unhandled exception event and see what's going on:

AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(HandlerMethod);

void HandlerMethod(object sender, UnhandledExceptionEventArgs e)
{
    if ((args.ExceptionObject is ThreadAbortException) != true)
    {
        var exception = args.ExceptionObject as Exception;
        MessageBox.Show(exception.ToString());
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号