When it is installed, Dotfuscator adds a system environment variable,
DOTFUSCATOR_HOME, that specifies the location of Dotfuscator on a particular machine.
DOTFUSCATOR_HOME is also appended to the system PATH environment variable (as long as there is room to add it).
If your system PATH environment variable was too long to append
%DOTFUSCATOR_HOME%; during installation, you may want to reduce the length of the system path and then append
%DOTFUSCATOR_HOME% to the system PATH yourself.
For side-by-side installs, the
DOTFUSCATOR_HOME environment variable refers to whichever version of Dotfuscator was installed last.
If you would like the variable to refer to another version, update the system environment variable to point to the install location of the other version.
When you uninstall Dotfuscator, the installer will unset DOTFUSCATOR_HOME and remove it from PATH, but only if the specified path matches the version being uninstalled. If you have other versions of Dotfuscator installed, you may want to reconfigure DOTFUSCATOR_HOME to point to one of those versions.
Multiple versions of Dotfuscator can be installed side-by-side from version 4.11 and up. To enable this click on the "advanced" button in the installer wizard and select "Install side-by-side With Current Installations". You can also configure which version of Dotfuscator will be used by Visual Studio by default for Dotfuscator Projects. You can select "latest Major", "latest Major.Minor", or the specific version you are installing. You can change the default later by editing the registry key at HKCU\Software\PreEmptive\Dotfuscator\DefaultMSBuildPath.
If you uninstall the most recent version, it will leave behind its MSBuild task and target files in the major and major.minor directories. To revert the major or major.minor files to a prior version you should either copy them from a specific version's subdirectory or manually delete the files and perform a repair on the version you want to revert to through Add/Remove Programs.
Visual Studio Integration
When doing a side-by-side installation, you can disable the Visual Studio integration features to not overwrite the current Visual Studio integrated Dotfuscator. If the version of Dotfuscator that is integrated with Visual Studio is uninstalled and you wish to revert to another version for integration, go into Add/Remove programs and select change on that version of Dotfuscator and first disable the integration and complete and then rerun the change with the feature enabled.
Please note that the procedure given here will allow multiple versions of the Dotfuscator Config Editor, the Dotfuscator command line interface, and Dotfuscator via MSBuild to run, but only one version of Dotfuscator may be integrated with Visual Studio at a time. Because a Dotfuscator Visual Studio Project is compatible with MSBuild, you can use a single .dotfuproj file for running in both contexts. However, Visual Studio integration is not capable of using the version of Dotfuscator pointed to by the DotfuscatorBinPath property. Visual Studio integration will always build using the latest installed version of Dotfuscator. If the DotfuscatorBinPath is not the default, you will get the following warning: "This Dotfuscator Project has a DotfuscatorBinPath or DotfuscatorDataPath different from the installed Visual Studio Dotfuscator extension."
When running multiple copies of Dotfuscator simultaneously, it is recommended that the following files be copied into the same directory as the Dotfuscator executable:
dotfuscator.dat (normally in %PROGRAMDATA%\PreEmptive Solutions\Dotfuscator [Edition]\4.0) dfusrprf.xml (normally in %LOCALAPPDATA%\PreEmptive Solutions\Dotfuscator [Edition]\4.0) dotfuscator.cfg (normally in %LOCALAPPDATA%\PreEmptive Solutions\Dotfuscator [Edition]\4.0)