title: How to see the stack trace of a deployed application that crashes on run
body: <p>I have an application that crashes as soon as it is launched but only after deployment (it will run fine in debug mode).</p>
  
  <p>For simplicity I've been deploying it as a CD style deployment in visual studio 2012.</p>
  
  <p>This is a c# windows application. </p>
  
  <p>The errors thrown (in the event log) are as follows:</p>
  
  <pre><code>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()
  </code></pre>
  
  <p>Followed by:</p>
  
  <pre><code>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: 
  </code></pre>
  
  <p>What would be the most likely cause of this?</p>
  
  <p>Thanks</p>