Share via


How to compile a C# project into native binary code(.exe like C++) file .

Question

Saturday, August 9, 2008 2:29 PM

when i try to compile a project, VS2005 only can compile it to IL code but not native binary code.

All replies (3)

Saturday, August 9, 2008 4:44 PM âś…Answered

That's how it works.  The JIT compiler turns the IL into machine code at runtime.  You can use Ngen.exe to do it earlier. That can only be done on the target machine.


Hans Passant.


Friday, August 29, 2008 6:28 PM

Earlier?when?Before compiling my project?

thanks for your answering


Friday, August 29, 2008 7:00 PM

"You can use Ngen.exe to do it earlier."

I think he means:

"You can use Ngen.exe to compile your application to binary code before running it."


David Morton - http://blog.davemorton.net/