title: How to start Azure Storage Emulator from within a program
body: <p>I have some unit tests that use Azure Storage.  When running these locally, I want them to use the Azure Storage emulator which is part of the Azure SDK v1.5.  If the emulator isn't running, I want it to be started.</p>
  
  <p>To start the emulator from the command line, I can use this:</p>
  
  <pre><code>"C:\Program Files\Windows Azure SDK\v1.5\bin\csrun" /devstore
  </code></pre>
  
  <p>This works fine.</p>
  
  <p>When I try to start it using this C# code, it crashes:</p>
  
  <pre><code>using System.IO;
  using System.Diagnostics;
  ...
  ProcessStartInfo processToStart = new ProcessStartInfo() 
  {   
      FileName = Path.Combine(SDKDirectory, "csrun"),
      Arguments = "/devstore"
  };
  Process.Start(processToStart);
  </code></pre>
  
  <p>I've tried fiddling with a number of ProcessStartInfo settings, but nothing seems to work.  Is anybody else having this problem?</p>
  
  <p>I've checked the Application Event Log and found the following two entries:</p>
  
  <p><strong>Event ID: 1023</strong>
  .NET Runtime version 2.0.50727.5446 - Fatal Execution Engine Error (000007FEF46B40D2) (80131506)</p>
  
  <p><strong>Event ID: 1000</strong>
  Faulting application name: DSService.exe, version: 6.0.6002.18312, time stamp: 0x4e5d8cf3
  Faulting module name: mscorwks.dll, version: 2.0.50727.5446, time stamp: 0x4d8cdb54
  Exception code: 0xc0000005
  Fault offset: 0x00000000001de8d4
  Faulting process id: 0x%9
  Faulting application start time: 0x%10
  Faulting application path: %11
  Faulting module path: %12
  Report Id: %13</p>