如何查看在运行时崩溃的已部署应用程序的堆栈跟踪

How to see the stack trace of a deployed application that crashes on run

我有一个应用程序在启动后立即崩溃,但仅在部署后崩溃(在调试模式下 运行 正常)。

为简单起见,我在 visual studio 2012 年将其部署为 CD 样式部署。

这是一个 c# windows 应用程序。

抛出的错误(在事件日志中)如下:

Application: applaunch.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException
Stack:
   at Konformance.App.Main()
   at System.AppDomain._nExecuteAssembly(System.Reflection.RuntimeAssembly, System.String[])
   at System.AppDomain.nExecuteAssembly(System.Reflection.RuntimeAssembly, System.String[])
   at System.Runtime.Hosting.ManifestRunner.Run(Boolean)
   at System.Runtime.Hosting.ManifestRunner.NewThreadRunner()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,             System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()

其次是:

Faulting application name: applaunch.exe, version: 4.0.30319.33440, time stamp: 0x52003c5a
Faulting module name: KERNELBASE.dll, version: 6.3.9600.17415, time stamp: 0x54504ade
Exception code: 0xe0434352
Fault offset: 0x00014598
Faulting process ID: 0x1a64
Faulting application start time: 0x01d02c18ff5c4f43
Faulting application path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\applaunch.exe
Faulting module path: C:\WINDOWS\SYSTEM32\KERNELBASE.dll
Report ID: 3ee36614-980c-11e4-8354-b8ca3a87a278
Faulting package full name: 
Faulting package-relative application ID: 

最可能的原因是什么?

谢谢

该问题原来是由用户错误使用版本控制软件 (SVN) 引起的。结果是从 .proj 文件中删除了几个部分,导致部署的包配置不正确。