모두Program.Main는 충돌 스택에 나타나지 않는 이유는
나는 메인 루틴의 모든 캐치되지 않는 예외를 처리하는 C# 응용 프로그램 쓰고 있어요 :
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainFrame());
}
catch (Exception e)
{
CrashReporter.Report(e);
}
}
을 그리고 때 응용 프로그램을 실행하고을 (심지어 릴리스 빌드) 그것은 작동하는 비주얼 스튜디오에서. 하지만 한 번의 클릭으로 게시하고 설치하면 대부분의 경우 예외가 Main 함수에서 발견되지 않습니다. 예외 스택은 다음과 같습니다.
...
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
메인은 스택에도 없습니다 ... 왜 그런 일이 생깁니 까? '모든 것을 잡으세요'와 같은 방법이 있습니까? 게시 된 대 로컬 빌드 동작이 다른 이유는 무엇입니까?
미리 감사 서지