As of Dotfuscator Professional 4.37 there is a much faster, easier, and more reliable way to integrate Dotfuscator into MSBuild. These instructions are still valid, but you should consider the new approach first.
This is the first in a series of what I hope to be informative postings around the theme of “Dotfuscator Tips, Tricks, and HOWTOs”. Today's topic, if you missed the title, is MSBuild integration. Dotfuscator Pro ships with an MSBuild task that is by default installed into the MSBuildExtensionsPath directory (e.g.
C:\Program Files\MSBuild) under “PreEmptiveDotfuscator4.0”. In this directory, you will also find
PreEmptive.Dotfuscator.Targets, the file that contains a common definition for the “Dotfuscate” target.