Using Demeanor Obfuscate MSBuild task with a Team Foundation Build
One of the tools I have used extensively for a number of years is Wise Owl's Demeanor obfuscator. I did quite a bit of research on available obfuscators some time back and settled on Demeanor as it offered the best balance of features, performance, flexibility and price and I've been happy with the purchase (and the excellent support which Wise Owl provide) ever since.
One of the features of Demeanor Enterprise Edition provides is an Obfuscate task for MSBuild which can be used to obfuscate a project during the build process. I've not made use of this until recently but I have just used it in a project I'm currently working on. I included the Obfuscate task in the MSBuild project file and when built inside Visual Studio it worked a treat, obfuscating my code as I intended.
Things didn't work quite so well when the project was build as part of a Team Build on our Team Foundation Server. Every time the obfuscate task was called it would bomb out and the build would fail. I've spoken to Brent at Wise Owl and it appears that Demeanor installs itself on a per-user basis to avoid the need for administrative permissions during install. When Demeanor installs, it creates a named value (“InstallationFolder”) under the “HKEY_CURRENT_USER\Software\Wise Owl Consulting LLC\Demeanor for .NET, Enterprise Edition\v4.0” registry key recording the installation folder. The Obfuscate task uses this registry entry to locate the Demeanor executable. If it the registry value doesn't exist then the Obfuscate task fails.
This was the problem affecting our Team Foundation Server. Demeanor had been installed in the context of an administrative account but Team Builds execute in the context of the build service account. Because Demeanor wasn't installed from the build service account, the registry value did not exist in the build service account's HKEY_CURRENT_USER hive. Manually adding the value fixes the problem and hey presto! The Obfuscate task now works perfectly on both team and local builds.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit