create a exe file...  
Author Message
ishkmi





PostPosted: Common Language Runtime, create a exe file... Top

can we comple our c# .net program as a normal exe(win 32 application) file rather than compile it as a MSIL which run on top of CLR.

for example in java there are tools to create exe files from the class file  ... is there are tools to create a normal exe file using MSIL code

 

thanks

ishkmi



.NET Development3  
 
 
TaylorMichaelL





PostPosted: Common Language Runtime, create a exe file... Top

You can use ngen to convert a .NET binary to a native binary. However you'll still have to have the .NET framework installed so I'm not sure what benefit you hope to gain from it. The only real benefit is the slight performance increase because JITting is no longer required.

Michael Taylor - 10/12/06


 
 
ishkmi





PostPosted: Common Language Runtime, create a exe file... Top

thanks Michael 1 benifit that i hope 2 get is the performance ..

and the second is i want to prevent someone that can see the in side of the coding using ildasm etc.

any one have an Idea..


 
 
TaylorMichaelL





PostPosted: Common Language Runtime, create a exe file... Top

NGen is the way to go then but I think the cost of NGen is going to outway the performance gains because you have to NGen during installation. As for ILDASM you could use an obfuscator to hide the MSIL. Don't assume that if it is in native code that it can't be reverse engineered because that is incorrect. There are many free tools available that can reverse engineer native images to partial (or even full) source without hardly any effort.

For a good discussion on NGen refer to the MSDN Magazine articles on the topic.

http://msdn.microsoft.com/msdnmag/issues/05/04/NGen/

http://msdn.microsoft.com/msdnmag/issues/06/05/CLRInsideOut/

Good luck,

Michael Taylor - 10/13/06