views:

177

answers:

2

Possible Duplicate:
Is there some way to compile a .NET application to native code?

When you compile a C# application, it is compiled to CIL code, to be interpreted by the framework when it is ran, but im wondering if its possible to generate a native x86 EXE file stub for my application(s).

This way it is not possible to directly open my applications in a decompiler.

P.S I cannot use a obfuscator for anything.

+1  A: 

There is a tool called Salmander .NET Linker but it is offered for a high price. Personally I've never used it, but I see no point in doing that. Offical website

You could also try virtualizing you application using ThinInstall or Xenocode Virtualization Studio. I've used Xenocode's product to embed .NET runtime into my application and it worked great. It generates a native packed executable with your assemblies inside.

Nick Brooks
The questionned mentionned the fact that he cannot use an obfuscator for anything. That prevented me from proposing an alternative tool. I'm still thinking how to answer this question ;)
Pierre 303
Salmander .NET Linker is a linker, not an obfuscator. I think ...
Nick Brooks
Yes but I do think that the user wanted to tell us that he do not want to use a commercial product. That's my guess. I'll give you 100 reputation points if I'm wrong ;)
Pierre 303
A: 

According to this answer: http://stackoverflow.com/questions/1188006/turning-net-executable-into-native-executable what you are looking for is called AOT

http://www.mono-project.com/AOT

Alternatively, you can check this official Microsoft technical document: http://msdn.microsoft.com/en-us/library/ht8ecch6(VS.71).aspx

Pierre 303