Question

HI, Is there a way to prevent a particular dll in C# being opened in reflector. I can open many of the dll's and can get the code using reflector. But when trying to open some dll's it shows an error message stating that "The particual dll does not contain a CLI header.".

How can I make a dll like this??

Was it helpful?

Solution

Are you sure that these DLLs are managed-code-dlls? I don't think so, if they don't contain the CLI header, they aren't written in C#.

And for your question, you can't prevent a managed-DLL from being opened in a decompiler, all what you can do is to obfuscate it.

OTHER TIPS

If you want to protect your .net dll you could obfuscate your assembly

Free .NET Obfuscation Tools

You have commercial ones too...

"The particual dll does not contain a CLI header.". message appears in Reflector because they are not managed dlls (.net).

I thought there was once a certain IL code which caused a crash in the reflector. But this bug is fixed now.

Obfuscation is nice - You can also try to encrypt certain critical parts of your code and decrypt+load+compile it at runtime. The problem is how to store the password.

You can't prevent it from being opened by the reflector.

There is no way to prevent Reflector from opening .Net assemblies, but you make make it pointless by obfuscating your assemblies. After obfuscating, class/method/fields are renamed, inline strings in methods are encrypted, method calls are hidden, method control flow is scrambled and so on. So, anybody who use Reflector will see a lot of garbage and will not be able to make sense of most of it.

DISCLAIMER: I work for LogicNP Software, the developers of Crypto Obfuscator

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top