Dotfuscator: Exclude property

Posted: May 23, 2013 in .Net/C#

Dotfuscator will rename all the class, property or field, method by default. This will cause problem in some cases. For example, when using Combobox, you can set DisplayMember to a class property.

comboBox.DisplayMember = “Name”;

Because Dotfuscator renames all the property, the Combobox won’t be able to display the list correctly.

To resolve this, just add a custom rule to exclude the Name property

  1. Click Add Type
  2. Uncheck the Regular Expression and check Exclude Type checkbox, set the name to the class which the Name property belongs to
  3. Right click the rule you newly created and click Add Field
  4. Uncheck the Regular Expression checkbox, set the Name to the property name

* Check or uncheck the regular expression based on your rule pattern. In my case, I only apply the rule to an exact class property.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s