The Config Editor is the primary graphical interface for creating, editing, and testing Dotfuscator configuration files. It allows you to configure protection features, manage input assemblies, build protected applications, and review build results without editing XML configuration files directly.
The Config Editor is useful for:
- Creating new Dotfuscator projects.
- Configuring protection settings.
- Managing input assemblies.
- Building protected applications.
- Reviewing reports and build output.
After you save a configuration, you can use it with the Config Editor, the command-line interface, or MSBuild integration.
Open the Config Editor
You can start the Config Editor from the Windows Start menu or by launching the executable (dotfuscatorUI.exe) from the Dotfuscator installation directory. If the installer adds %DOTFUSCATOR_HOME% to the PATH, you can just run dotfuscatorUI from the command line unqualified.
By running dotfuscatorUI.exe on the command line, you can start the Config Editor with external properties and a specific config file:
dotfuscatorUI.exe -p=outdir=c:\temp config_template.xmlWhen the Config Editor opens, you can:
- Create a new configuration.
- Open an existing configuration.
- Open one of the sample projects included with Dotfuscator.
Main Window
The Config Editor is organized into several areas that provide access to your configuration and protection features.
Toolbar
The toolbar provides quick access to common actions, including:
- Create a new configuration file.
- Open an existing configuration file.
- Save the current configuration file.
- Build the project.
- Open recently used configurations.
Depending on the current project, additional commands may also be available.
Navigation Pane
The navigation pane lists the configurable areas of the project, including:
- Settings
- Inputs
- Rename
- Control Flow
- String Encryption
- Resource Encryption
- Removal
- Linking
- PreMark
- Checks
- Output
Select an item to view and edit its settings.
Workspace
The workspace displays the editor for the selected feature. Each feature provides configuration options appropriate for that protection.
Create a Configuration
To create a new configuration:
- Open the Config Editor.
- Add assemblies in the Input tab.
- Configure the desired protection features.
- Save the configuration.
The first time you save a new config file, you are prompted to enter a location on disk for the new file. Configuration files use the .xml format and can be reused for future builds.
Open an Existing Configuration
To edit an existing configuration:
- Select File > Open.
- Browse to the configuration file.
- Open the file.
The Config Editor loads the project and displays the current protection settings.
Manage Input Assemblies
Input assemblies define the applications or libraries that Dotfuscator protects.
The Input editor allows you to:
- Add or remove assemblies.
- Configure Library Mode.
- Enable or disable Transform XAML.
- Configure package exclusions.
- Configure assembly-specific options.
Add Assemblies
- Go to the Input tab and select the Add new input icon.
-
From the Add Input dialog, type in the package or assembly's directory and file name, type in a directory and file mask, or browse the file system for an input or folder.
-
Select OK.
If you specify the input path using properties, you can view the actual, fully resolved value by placing the cursor on the item that has a Property embedded in it.
Edit and Remove Inputs
Use the Edit and Remove icons to change or remove inputs from the config. Highlight an input on the list and select the appropriate toolbar icon. You can also delete an input by highlighting it and pressing the Delete key.
Input Options
The following options are available in the toolbar for input assemblies:
| Icon | Description |
| Enables library mode for all assemblies. | |
| Honors obfuscation attributes for all assemblies. | |
| Strips obfuscation attributes for all assemblies. | |
| Transforms XAML/BAML resources in all assemblies. |
Alternatively, you can configure these settings for specific assemblies by checking or unchecking the appropriate checkbox under the input assembly's entry in the list.
For more information, see:
Excluding Package Assemblies
Exclude specified assemblies contained in packages from being round tripped through Dotfuscator as follows:
- Right-click on the assembly node in the package
- Select Exclude assembly from package.
This causes the assembly to be added to the list of package artifacts that are not processed by Dotfuscator. By being added to the artifacts list, assemblies are exempt from any Dotfuscator protection features and all existing strong naming and signing is preserved. This can be reverted by right-clicking again and choosing Include assembly in package.
Including Directories
Dotfuscator provides the ability to protect all files in a directory via a Directory Package input. A Directory Package consists of a relative or absolute path to a directory and optionally a wildcard specifier (file mask) of which files to match. All managed assemblies that match the file mask are used as inputs to Dotfuscator. Any unmanaged assemblies or other files that match the file mask are listed as Package Artifacts and, while not processed by Dotfuscator, are copied to the output directory during the build process.
Add a Directory Package using the following steps:
- Select the Add new input icon in the Inputs tab.
- Type the path and a wildcard (for example,
C:\MyApps\*.dll) into the dialog box. - Use the Browse button as an alternative to navigate to a directory. To include all files in that directory (*.*), select the folder and leave the text Folder Select in the file name prompt.
You can specify an explicit path or use a Property to specify a substitution property for all or part of the path.
All settings are applied to all Directory Package assembly inputs and exclusion rules can be created and saved in the Dotfuscator config for any assemblies contained in the list of package assemblies.
Configure Protection Features
Each protection feature has its own editor that provides feature-specific configuration options.
Depending on your edition of Dotfuscator, available features include:
- Renaming
- Control Flow
- String Encryption
- Removal
- Resource Encryption
- Smart Obfuscation
- Watermarking (PreMark)
Each editor allows you to configure exclusions, inclusions, or feature-specific options as appropriate. For detailed information about individual editors, see:
- The Renaming Editor
- The Control Flow Editor
- The String Encryption Editor
- The Resource Encryption Editor
- The Removal Editor
- The PreMark Editor
- The Checks Editor
Configure Project Settings
The Settings editor contains project-wide options that affect the build process.
Options
The options editor allows you to set the options for the config.
You can selectively enable or disable Dotfuscator's features, such as renaming, from this tab. Additionally, you may also modify the following options:
| Setting | Description | Values / Default |
| Emit Debugging Symbols | Controls whether Dotfuscator generates updated debugging symbols (such as PDB files) for protected assemblies. |
Automatically Based on Input Assemblies (default): Generates debugging symbols that match the input assembly format. Never: Does not generate debugging symbols, even if the input assemblies contain them. |
| Inherit Obfuscation Attributes | Specifies whether declarative obfuscation attributes applied to types and methods are also applied to derived types and overriding methods. | Enabled or disabled. |
| Smart Obfuscation | Enables or disables automatic renaming and removal exclusions for recognized application types. | Enabled by default. See Smart Obfuscation for more information. |
| Suppress ILDASM | Adds the SuppressIldasmAttribute to output assemblies, preventing Microsoft ILDASM from displaying the assembly's IL. It also prevents Visual Studio from using the Navigate to Decompiled Sources feature. |
Available only for assemblies targeting .NET Framework 2.0 and later. |
| Use Only Mono-Compatible Transforms | Disables transforms that have previously been found to cause runtime issues under the Mono runtime. This may reduce protection but improves compatibility with Mono-based platforms. | Disabled by default. |
| Disable [Feature] | Enables or disables individual Dotfuscator protection transforms. |
Disabled by default: Linking, Watermarking (PreMark), Removal, String Encryption. Enabled by default: Renaming, Control Flow, Checks. |
| Build Progress | Controls the amount of information displayed in the Output window during a build. | Configurable verbosity level. |
| Investigate Only | Generates reports without producing protected output assemblies. Useful for evaluating a configuration before applying protection. | Enabled or disabled. |
Properties
The properties editor allows you to view and add user-defined name-value pairs as Config Properties and to view External Properties that have been defined from the command line. For more information, see Property List and Properties.
To add a Config Property, do the following:
- Select the Add config property icon on the config properties toolbar.
- Enter the Property Name and Property Value.
- Select OK.
Remove or modify config properties with the options on the config properties toolbar.
Build Settings
Use the Build Settings editor to configure where Dotfuscator writes protected assemblies and stores temporary files during the build process.
When you create a new configuration, Dotfuscator sets the Destination Directory to ${configdir}/Dotfuscated by default. The ${configdir} property represents the directory that contains the configuration file.
Destination Directory
The Destination Directory specifies where Dotfuscator writes the protected assemblies.
Enter the directory path manually or select Browse to select a location.
Temporary Directory
The Temporary Directory specifies where Dotfuscator stores temporary files during the build. This setting is optional.
By default, Dotfuscator uses the Windows temporary directory. To use a different location, enter the directory path or select Browse to select one.
Build Events
Use the Build Events editor to run external programs before or after a Dotfuscator build.
The editor provides separate configuration sections for Pre-Build Events and Post-Build Events.
Pre-Build Events
A pre-build event runs before Dotfuscator begins processing the input assemblies.
Configure the following properties:
| Property | Description |
| Program Path | Specifies the executable or script to run. |
| Command Line | Specifies the command-line arguments passed to the program. |
| Working Directory | Specifies the directory from which the program executes. |
| Halt Build On Failure | Specifies whether Dotfuscator stops the build if the program returns a non-zero exit code. |
Pre-build events are commonly used to prepare files, generate resources, or perform validation before protection begins.
Post-Build Events
A post-build event runs after Dotfuscator finishes processing the assemblies.
In addition to the program settings available for pre-build events, you can configure when the event runs and how often it executes.
| Property | Description |
| Program Path | Specifies the executable or script to run. |
| Command Line | Specifies the command-line arguments passed to the program. |
| Working Directory | Specifies the directory from which the program executes. |
| Halt Build On Failure | Specifies whether Dotfuscator stops the build if the program returns a non-zero exit code. |
| Run On Each Module | Specifies whether the event runs once for each protected output assembly. If disabled, the event runs once after the build completes. |
| Run When? | Specifies when the event runs: after every build, only when the build succeeds, or only when the build fails. |
Post-build events are commonly used to copy protected assemblies, archive reports, package build outputs, or perform deployment tasks.
Signing
Use the Signing editor to configure how Dotfuscator signs or re-signs strong-named assemblies after applying protection.
Because Dotfuscator modifies an assembly during the build process, any existing strong-name signature becomes invalid. If your application uses strong-named assemblies, configure signing so Dotfuscator re-signs the protected output before the build completes.
Enable Re-sign Strong Named Assemblies to have Dotfuscator automatically re-sign protected assemblies that were previously strong named.
After enabling this option, configure how Dotfuscator locates the signing key.
| Setting | Description |
| Re-sign Strong Named Assemblies | Enables automatic signing or re-signing of protected strong-named assemblies. |
| Use Strong Name Utility | Uses the Strong Name Utility during the signing process. |
| Do not use attributes to find key | Ignores assembly attributes when locating the signing key. |
| Key File | Specifies the key file used for signing. |
| Key Container | Specifies the key container that stores the signing key. |
| Finish Signing Delay Signed Assemblies | Completes the signing process for delay-signed assemblies. |
| Key File (Delay Signing) | Specifies the key file used to complete signing of delay-signed assemblies. |
Reports
Dotfuscator generates reports that describe how your assemblies were protected during a build. These reports can help you verify protection settings, troubleshoot issues, and analyze the changes Dotfuscator made.
Store report files for every release in a secure location. Some reports, such as the Renaming Report, are required to decode obfuscated stack traces after deployment.
The Reports section of the Config Editor contains separate pages for configuring the Renaming, Removal, and Smart Obfuscation reports.
Renaming Report
Use the Renaming report settings to configure the output generated by the Renaming transform.
| Setting | Description |
| Output map file | Specifies where Dotfuscator saves the XML renaming map file. This file records the original and protected names of renamed identifiers. |
| Overwrite without backing up existing copy | Replaces an existing report instead of creating a backup copy before writing the new report. |
| Save as HTML | Generates an HTML version of the renaming report in addition to the XML report. |
| Use custom stylesheet | Specifies the XSL stylesheet used to generate the HTML report. Leave this field blank to use Dotfuscator's default stylesheet. This option is available only when Save as HTML is enabled. |
Removal Report
Use the Removal report settings to configure the report generated by the Removal transform.
| Setting | Description |
| Removal report file | Specifies where Dotfuscator saves the XML Removal report. |
| Overwrite without backing up existing copy | Replaces an existing report instead of creating a backup copy before writing the new report. |
| Save as HTML | Generates an HTML version of the Removal report in addition to the XML report. |
| Use custom stylesheet | Specifies the XSL stylesheet used to generate the HTML report. Leave this field blank to use Dotfuscator's default stylesheet. This option is available only when Save as HTML is enabled. |
Smart Obfuscation Report
Use the Smart Obfuscation report settings to configure the report generated by the Smart Obfuscation feature.
The Smart Obfuscation report records the actions and warnings generated during static analysis. If no report file is configured, the report is displayed in the Smart Obfuscation Report tab next to the Build Output tab.
| Setting | Description |
| Smart obfuscation report file | Specifies where Dotfuscator saves the Smart Obfuscation report. |
| Overwrite without backing up existing copy | Replaces an existing report instead of creating a backup copy before writing the new report. |
| Report Verbosity | Controls the amount of information included in the report. Available options are All, Warnings Only, and None. |
Feature Map Strings
Use the Feature Map Strings editor to create custom feature map strings for Declarative Obfuscation.
Feature map strings allow you to associate a custom value used in an ObfuscationAttribute's Feature property with one or more Dotfuscator protection features.
From the toolbar, you can add, edit, and remove feature map strings. The Add option brings up a dialog that allows you to map feature strings to supported Dotfuscator features.
The selected Features denote the configuration that an ObfuscationAttribute decorated with that Map String produces.
User Defined Assembly Load Path
Use the User Defined Assembly Load Path editor to specify additional directories that Dotfuscator searches when resolving referenced assemblies.
| Setting | Description |
| Search First | Searches the user-defined assembly load paths before Dotfuscator's standard assembly search locations. When cleared, Dotfuscator searches the user-defined paths only after its standard search locations. |
When you add or edit a search path, enter the directory that contains assemblies Dotfuscator should search when resolving references.
Click OK to save the path and add it to the list.
Build the Project
After configuring the project:
- Save the configuration.
- Select the Build option on the toolbar.
- Review the output for warnings or errors.
Dotfuscator processes the configured assemblies and writes the protected output to the configured output location.
Note: If you are using the Dotfuscator MSBuild targets, you cannot build from the Config Editor. Instead, use the normal build process in Visual Studio or through MSBuild.
Review Build Output
The Output tab displays:
- Build progress.
- Informational messages.
- Warnings.
- Errors.
Review the output after each build to verify that protection completed successfully. Browse the tree view and see how Dotfuscator renamed your types, methods, and fields. The new names appear as child nodes under the original nodes in the tree.
Open the output directory by selecting the Open output directory icon on the toolbar or by navigating to Build > Open Output Directory.
Set User Preferences
The Tools menu provides a News and Updates section where users may opt to allow Dotfuscator to periodically check for updates. A link to our Privacy Policy is also included in this dialog.
There is also a link that takes you to the Customer Feedback dialog. The text in the link shows your current opt-in/opt-out status. If you are concerned about privacy, see Read our privacy policy.