How to Compile with ngen.exe and How to run the native code that is generated?
问题 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 ngentest . A file by name ngentest.vshost.exe is created in vs2010\projects\ngentest\bin\debug . I used this file as a ngen command argument in VS2010 command prompt, as follows: ngen "c:\documents\vs2010\projects\ngentest\bin\debug\ngentest.vshost.exe" But when I do this, I can't receive PublicKeyToken and I couldn't find any assembly anywhere! If my assembly