title: How to Compile with ngen.exe and How to run the native code that is generated?
body: <p>I want to compile a C# program using ngen command line for a special purpose. So I create a console application in VS2010 and named it <code>ngentest</code>. A file by name <code>ngentest.vshost.exe</code> is created in <code>vs2010\projects\ngentest\bin\debug</code>.
  I used this file as a ngen command argument in VS2010 command prompt, as follows:</p>
  
  <pre><code>ngen "c:\documents\vs2010\projects\ngentest\bin\debug\ngentest.vshost.exe"
  </code></pre>
  
  <p>But when I do this, I can't receive <code>PublicKeyToken</code> and I couldn't find any assembly anywhere!
  If my assembly is created, where it is? And how I can find it? How I can run it(with command, or...!) to get my output?</p>
  
  <p>Otherwise when I build my project with build ngen from Build menu from VS, some file were created in mentioned directory, and one of them is <code>ngentest.exe</code>. </p>