yck1509 / ConfuserEx

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

Excluding namespaces from the ObfuscationAttribute gives a parser error #510

Closed LennardF1989 closed 8 years ago

LennardF1989 commented 8 years ago

I tried to excude 3 namespaces from renaming their class-names using the following:

[assembly: Obfuscation(Exclude = false, Feature = "namespace 'myassembly.something.mynamespace':-rename")]

But upon obfuscating, it would complain it found an unexpected token: myassembly.something.mynamespace

I based the Feature on this issue: https://github.com/yck1509/ConfuserEx/issues/203

The last comment in that issue also mentions the exception about the token I mentioned.

joeatsalot commented 8 years ago

It seems to work if I change namespace 'myassembly.something.mynamespace': to namespace('myassembly.something.mynamespace'): ... ie. adding brackets around the namespace string.

LennardF1989 commented 8 years ago

Going to try that out, saves me a lot of work!

joeatsalot commented 8 years ago

Hey @yck1509, I think the wiki is wrong, and is leading people to problems. ie. this page: https://github.com/yck1509/ConfuserEx/wiki/Declarative-Obfuscation

I think the incorrect syntax is the actual problem behind this issue, as well as #203, and maybe more.

yck1509 commented 8 years ago

Indeed, I changed that syntax in the latest version. I've updated the wiki to reflect this change.