yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.56k stars 1.61k forks source link

Can the Declarative Obfuscation (attributes) be used with a crproj? #166

Closed ErrCode closed 9 years ago

ErrCode commented 9 years ago

Hi. Quite new to using ConfuserEx and I'm having trouble trying to understand why my Declarative Obfuscation (https://github.com/yck1509/ConfuserEx/wiki/Declarative-Obfuscation) does not appear to be taking any affect on the output.

Could it be that it is incompatible with using a .crproj file?

A sample of what my crproj file kind of looks like:

<project outputDir=".\Confused" baseDir="." xmlns="http://confuser.codeplex.com">
  <rule pattern="true" preset="minimum" inherit="false" />
  <module path="my.dll" snKey="C:\key.pfx" snKeyPass="12345" />
</project>

And I have the following Declarative Obfuscation attributes on one of the .cs class files in my my.dll assembly: [assembly: Obfuscation(Exclude = false, Feature = "generate debug symbol: true")] [assembly: Obfuscation(Exclude = false, Feature = "random seed: Hello!")] [assembly: Obfuscation(Exclude = false, Feature = @"strong name key:C:\key.pfx")] [assembly: Obfuscation(Exclude = false, Feature = "strong name key password:12345")]

[assembly: Obfuscation(Exclude = false, Feature = "packer:compressor(key=dynamic)")] [assembly: Obfuscation(Exclude = false, Feature = "preset(minimum);+ctrl flow;-anti debug;+rename(mode=letters,flatten=false);")]

The output only seems to be affected by the crproj rule. Not the Declarative Obfuscation attributes.

ErrCode commented 9 years ago

Sorry. I think my question is a duplicate of this one: https://github.com/yck1509/ConfuserEx/issues/139 I will follow that thread instead for updates about combined support of crproj and the ObfuscationAttribute.