title: ClrMd throws exception when creating runtime
body: <p>I am using the CLR Memory Diagnostics library to get the stack trace of all threads in a running process:</p>
  
  <pre><code>        var result = new Dictionary&lt;int, string[]&gt;();
  
          var pid = Process.GetCurrentProcess().Id;
  
          using (var dataTarget = DataTarget.AttachToProcess(pid, 5000, AttachFlag.Passive))
          {
              string dacLocation = dataTarget.ClrVersions[0].TryGetDacLocation();
              var runtime = dataTarget.CreateRuntime(dacLocation); //throws exception
  
              foreach (var t in runtime.Threads)
              {
                  result.Add(
                      t.ManagedThreadId,
                      t.StackTrace.Select(f =&gt;
                      {
                          if (f.Method != null)
                          {
                              return f.Method.Type.Name + "." + f.Method.Name;
                          }
  
                          return null;
                      }).ToArray()
                  );
              }
          }
  </code></pre>
  
  <p>I got this code from <a href="https://stackoverflow.com/questions/2057781/is-there-a-way-to-get-the-stacktraces-for-all-threads-in-c-like-java-lang-thre">here</a> and it seems to be working for others, but it throws an exception for me on the indicated line, with the message <code>This runtime is not initialized and contains no data.</code></p>
  
  <p><code>dacLocation</code> is set as <code>C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscordacwks.dll</code></p>