Agile.net .NET Obfuscator - types marked as [Serializable] are not obfuscated

724 Views Asked by At

Using Agile.net .NET Obfuscator I have noticed that types marked as [Serializable] are not obfuscated. Is it possible to disable this? So I want to obfuscate also types marked as [Serializable]

1

There are 1 best solutions below

0
On

You can instruct Agile.net to rename types marked with [Serializable] attribute, you do that by decorating the serializable type with [System.Reflection.ObfuscationAttribute] attribute.

However you should note that this is highly not recommended. The main reason is that if you allow this member names of the serializable type will get renamed and therefore your code might break when trying to deserialize types which were serialized earlier using a different version of your software.