Search code examples
c#obfuscar

Visual Studio `reference` needed to enable use of the Obfuscar attribute


My Obfuscar configuration does not seem to skip types the way I expected. I'm trying the alternative approach to obfuscate only what is marked.

I enabled marking with the configuration element <Var name="MarkedOnly" value="true" />

In front of C# object definitions I am trying to mark for obfuscation using the [Obfuscate] attribute. The instructions at http://obfuscar.codeplex.com/wikipage?title=Configuration&referringTitle=Documentation are to "reference Obfuscar.exe". Neither the xxx_bin.zip nor the xxx_src.zip downloads contain such file. I tried to reference Obfuscar.Console.exe and Obfuscar.dll in Visual Studio. In both cases the [Obfuscate] attribute is not recognized.

How can I setup to get this attribute to be recognized?


Solution

  • That attribute is obsolete and you should use System.Reflection.ObfuscationAttribute instead. Forgot to update the wiki page to reflect the changes.