title: Why does Run All cause a crash in VS2012 unit testing but running one by one doesn't?
body: <p>We just "upgraded" from Visual Studio 2008 to Visual Studio 2012. We updated our unit tests and now they pass when running them individually but when I try to Run All, I got the following error:</p>
  
  <pre><code>The active Test Run was aborted because the execution process exited unexpectedly. To investigate further, enable local crash dumps either 
  at the machine level or for process vstest.executionengine.appcontainer.x86.exe. Go to more details: [http://go.microsoft.com/fwlink/?linkid=232477][1]
  </code></pre>
  
  <p>So I went to the <a href="http://go.microsoft.com/fwlink/?linkid=232477" rel="noreferrer">link</a> and followed the instructions to add the registry key to enable local crash dumps. The error message then changed to:</p>
  
  <pre><code>The active Test Run was aborted because the execution process exited unexpectedly. Check the execution process logs for more information. 
  If the logs are not enabled, then enable the logs and try again.
  </code></pre>
  
  <p>Apparently it noticed the changes that I made in the registry to enable crash. However, when I looked in %LOCALAPPDATA%\CrashDumps, no files were being created.</p>
  
  <p>If I run one test at a time (or even a few tests at a time), I can get them all to pass. The problem is only with Run All.</p>
  
  <p>Has anyone else encountered similar problems? If so, how did you solve them?</p>
  
  <p>Essentially the same question was asked on <a href="http://social.msdn.microsoft.com/Forums/vstudio/en-US/3d64b17c-6d47-4213-87c6-5c92d0d62ad9/unit-test-problem-in-tfs" rel="noreferrer">MSDN</a>, but the answer was something like "click the link to the crash dump". That answer doesn't help me because I don't see any link to the crash dump and I am unable to get the crash dump to be generated.</p>
  
  <p><a href="https://stackoverflow.com/questions/12581714/why-my-c-cx-unit-test-does-not-fail">This question</a> on StackOverflow is also similar, and ended up resulting in a <a href="https://connect.microsoft.com/VisualStudio/feedback/details/764583/test-explorer-is-not-updated-properly-when-a-test-fails-inside-an-async-task" rel="noreferrer">bug being logged on Microsoft Connect</a> (which looks to be deferred for some reason), but my problem might be different because my code has nothing to do with "async tasks" (I don't think).</p>
  
  <p>EDIT: The problem went away, seemingly on its own, but the problem was likely an exception that wasn't being caught in the unit test code, as some of the answers below suggest. However, I'm still confused as to why the problem only appeared with Run All, and not when running smaller groups of tests or Debug All.</p>