views:

368

answers:

2

What should I do if I want to release a .net assembly but wish to keep its internals detailed in the manifest private (from a utility such as ildasm.exe) ?

+6  A: 

I think what you're talking about is "obfuscation". There are lots of articles about it on the net:

http://en.wikipedia.org/wiki/Obfuscation

The "standard" tool for obfuscation on .NET is by Preemptive Solutions:

http://www.preemptive.com/obfuscator.html

They have a community edition that ships with Visual Studio which you can use.

You mentioned ILDasm, have you looked at the .NET Reflector?

http://aisto.com/roeder/dotnet/

It gives you an even better idea as to what people can see if you release a manifest!

Mark Ingram
+1  A: 

The CLR cannot directly load modules that contain no manifest. So you can't make an assembly completely private unless you also want to make it unloadable ;)

You can however, as Mark noted above, use obfuscation tools to hide the parts you would like to keep truly internal.

It's too bad the internal keyword doesn't exclude that metadata

EDIT: it looks like this question is highly related

John Douthat