Dotfuscator User's Guide
Project Properties

In Visual Studio, you can access a Dotfuscator project's property pages from the top level item for the project in Solution Explorer:

Configuration Properties > Global Options

The Global Options property page allows you to set the global options for the Project. These are explained in detail in the Global Section. You can also selectively enable Dotfuscator’s features. Here is a summary of the properties you can set:

Configuration Properties > Project Properties

The Project Properties page contains a facility to view and add user-defined name-value pairs as Project Properties and to view External Properties that have been defined by Dotfuscator itself.

Project Properties can be thought of as simple string substitution macros that may be used wherever a filename or path is required. See Property List and Properties for a full explanation.

To add a Project Property, click the New button, then edit the property name and value in the Project Properties grid. To delete one or more Project Properties, select the row or rows in the Project Properties grid that you wish to delete, then click the Delete button.

Configuration Properties > Build Settings

The Build property page allows you to specify the output directory and an optional temporary directory.

Build Directories

When you create a new project, the output directory is set by default to "${configdir}\Dotfuscated". The ${configdir} is a built in property that is expanded to the folder that your project configuration file is saved to.

If you want to choose a different output directory, you can browse for it or type it into the Output Directory text box.

You can also optionally specify a temporary directory for Dotfuscator to use for scratch files during processing. If not specified, the temp directory specified by the Windows environment is used.

 Configuration Properties > Build Events

The Build Events property page is where you specify Build Events for your Dotfuscator project. For each event, specify an external program (Program Path) that runs when the event occurs. You can specify a working directory and command line options for the program and you can specify if the Dotfuscator build should halt (fail) if the specified program fails.

For the post build event, specify under what conditions it will run (e.g. all the time, only if the build succeeds, or only if the build fails).

You can also specify whether you want the post build event to run only once for the project, or run once for each output module.

 Configuration Properties > Signing

Strong Naming

The Signing property page allows you to configure Dotfuscator to automatically sign or resign strongly named assemblies. See Dotfuscating Strong Named Assemblies for more information.

Authenticode Digital Signing

The Authenticode Digital Signing option allows you to attach an Authenticode digital signature to your application.  Similar to a security certificate, this signature certifies that the application you are obfuscating and instrumenting is your intellectual property, and allows users to ensure that the resulting binaries were provided by you alone and have not been modified.  This feature adds another level of security to safeguard your application. To attach an Authenticode signature to your output assemblies, check the Sign Output Assemblies checkbox and then click the "…" (ellipsis) to locate your Key File, or enter its path in the text box.  Once the Key File field is properly populated, click the Set Password... button to set the password for your Key File.

The Timestamp URL field provides the ability for you to specify the URL of an Authenticode timestamp service. This URL will be accessed during Dotfuscator's signing process, and will provide additional data which will allow your assemblies' Authenticode signatures to remain valid after your code-signing certificate has expired. This element is optional. If omitted, this additional data will not be included, and your assemblies' Authenticode signatures will become invalid once your code-signing certificate expires.

Configuration Properties > Reports > Renaming

The renaming report provides a summary of all the elements renamed by Dotfuscator during a specific run, including a statistics section. The Renaming Report File (Output Map File) section allows you to specify the location to save a renaming map file. You may leave the default value, or enter your preferred path. If you know the name and path of the mapping file you want to use, you can type it directly into the text box. Alternatively, you can browse your file system for the intended file location. The Browse button on the right of the text box brings up the Select Map Output File window that provides a familiar navigational dialog. 

You also have the option of overwriting the output file each time you build the application without generating a backup of the existing copy of the output. Dotfuscator has a default transform that can generate a readable HTML formatted version of the report in addition to the default .XML format. If you do check the Output As HTML box, the Custom Transform (Leave blank for default) field is activated. As the field name states, leave this blank for the default custom transform or click "…" (ellipsis) to select the location of your choice.

Configuration Properties > Reports > Removal

The removal report provides a summary of all the elements removed by Dotfuscator during a specific run, including a statistics section. The Removal Report File section allows you to specify the location to save the report. Two approaches are available. If you know the name and path of the file you want to use, you can type it directly into the text box. Alternatively, you can browse your file system for the intended file location. The "…" (ellipsis) button on the right of the text box brings up the Select Removal Report File window that provides a familiar navigational dialog. 

You also have the option of overwriting the output file each time you build the application without generating a backup of the existing copy of the output. The removal report can also be written out as a readable, HTML formatted document, in addition to the XML formatted version. This report provides a quick cross reference that allows you to quickly navigate through all types, fields, and methods to see at a glance which were removed. Checking the Output as HTML checkbox tells Dotfuscator to write this report using the same name and path information as the XML version. If the default HTML report doesn't meet your reporting requirements, you can provide your own XSL document that Dotfuscator uses to transform the XML version.If you do check the Output As HTML box, the Custom Transform (Leave blank for default) field is activated. As the field name states, leave this blank for the default custom transform or click "…" (ellipsis) to select the location of your choice.

Configuration Properties > Reports > Smart Obfuscation

The smart obfuscation report provides a summary of all the elements that could not be renamed or removed based on rules provided by the smart obfuscation feature. If items are excluded by smart obfuscation but no destination for the report is specified, the report will appear in the Smart Obfuscation Report view of the Output tab at the bottom of Visual Studio's window. The Smart Obfuscation Report File field allows you to specify the location to save the report. Two approaches are available. If you know the name and path of the mapping file you want to use, you can type it directly into the text box. Alternatively, you can browse your file system for the intended file location. The "…" (ellipsis) button on the right of the text box brings up the Select Smart Obfuscation Report File window that provides a familiar navigational dialog. 

You have the option of overwriting the output file each time you build the application without generating a backup of the existing copy of the output.  You may also optionally configure the verbosity of the report. Allowed values for the verbosity attribute are All, Warnings Only, and None.  The default value is All. 

Configuration Properties > Setup > Feature Map Strings

The feature map strings property page is for Declarative Obfuscation. For a complete description of Dotfuscator’s support for Declarative Obfuscation, see Declarative Obfuscation via Custom Attributes. That section describes the Feature Map and lists the native feature strings that Dotfuscator understands.

From the toolbar, you can add, edit, and remove feature map strings. The Add and Edit buttons bring up a dialog that allows you to map feature strings to supported Dotfuscator features.

When you click the Add icon, the New Feature Map dialog box displays.  Enter the Feature Name and select the appropriate Mapping String for that feature.  To select more than one mapping string, press and hold the Control key and click on the appropriate Mapping String.  Click OK when you are done.  The new feature and its strings display in the Feature Map Strings Property page:

The new feature and its strings display in the Feature Map Strings Property page:

 

Configuration Properties > Setup > Assembly Load Path

Using this property page, you can edit your project’s user defined assembly load path. From the toolbar, you can add or remove directories, edit existing directories, or change the order in which they are searched. Check the Search First checkbox to have Dotfuscator search the load path before applying its standard search. When unchecked, Dotfuscator will search the loadpath only after applying its standard search.

 

 


© 2016 PreEmptive Solutions, LLC. All Rights Reserved.

www.preemptive.com