The scenario is we're about to release an exe to our clients. It's a
winforms application that uses reflection, remoting, generics, and
serialization. We want to protect the intellectual proprety rights of our
code. One solution is to obfuscate the exe. I've come across some 3rd party
solutions that claim they can compile the exe to native code (xenocode,
remotesoft, etc). I'm wondering if there is some tool in the .NET framework
that can compile winforms applications directly to native code, thereby
bypassing MSIL + JIT compilation? The native executable can then be
deployed.

I've read about the ngen utility, but it doesn't seem applicable in this
case. From my understanding, ngen will precompile the exe and add it to the
native image cache on the respective machine. What I'm looking for here is a
way to bypass MSIL + JIT compilation.

Thank you!

Re: Deploying native code. by Herfried

Herfried
Wed Apr 16 18:01:11 CDT 2008

"Lamrin" <Lamrin@discussions.microsoft.com> schrieb:
> The scenario is we're about to release an exe to our clients. It's a
> winforms application that uses reflection, remoting, generics, and
> serialization. We want to protect the intellectual proprety rights of our
> code. One solution is to obfuscate the exe. I've come across some 3rd
> party
> solutions that claim they can compile the exe to native code (xenocode,
> remotesoft, etc). I'm wondering if there is some tool in the .NET
> framework
> that can compile winforms applications directly to native code, thereby
> bypassing MSIL + JIT compilation? The native executable can then be
> deployed.

No, there is no such tool contained in the .NET Framework.

> I've read about the ngen utility, but it doesn't seem applicable in this
> case. From my understanding, ngen will precompile the exe and add it to
> the
> native image cache on the respective machine. What I'm looking for here
> is a
> way to bypass MSIL + JIT compilation.

Well, placing a native image in the image cache will bypass the process of
translating MSIL to native code, but the MSIL image is still available on
the machine.

If you really want to protect your intellectual property (code), place the
binary on a Web server and offer the service as a Web service. You can
either place it on a server you are controlling or in a "sealed" box you
ship to the customer.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>