Currently, the "Strip the debug information" option is a global setting that disables the renaming function. While we have numerous classes in our assembly, we only intend to rename the members of a select few.
When "Strip the debug information" is disabled, the [Obfuscation(Exclude = false, Feature = "renaming")] attribute doesn't function as intended. Is it possible to enable this attribute selectively for specific classes without enabling "Strip the debug information" and adding hundreds of [Obfuscation(Exclude = true, Feature = "renaming")] attributes?
selective class member renaming with ObfuscationAttribute
-
- Posts: 58
- Joined: Wed Jul 05, 2023 6:21 am
Re: selective class member renaming with ObfuscationAttribute
It seems you need something like this:
Code: Select all
[assembly:Obfuscation(Feature = "renaming", Exclude = true)]
[Obfuscation(Feature = "renaming", Exclude = false, ApplyToMembers = true)]
class Foo {
...
-
- Posts: 58
- Joined: Wed Jul 05, 2023 6:21 am
Re: selective class member renaming with ObfuscationAttribute
Thank you! It works.