I am trying to automatically dotfuscate my projects during the build process in TFS.
I have created a "Post-Build Event" under the project properties as follows:
"C:\Program Files (x86)\PreEmptive Solutions\Dotfuscator Professional Edition 4.9\dotfuscator.exe" /in:"$(TargetPath)" /out:"$(TargetDir)Obfuscated\" /honor:on /strip:on /prune:off /rename:off /suppress:on /mapout:"$(TargetFileName).xml" /debug:pdb xcopy /S /R /Y "$(TargetDir)Obfuscated\$(TargetFileName)" "$(TargetDir)"
When this event kicks off I get the following error:
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (3717): The command ""C:\Program Files (x86)\PreEmptive Solutions\Dotfuscator Professional Edition 4.9\dotfuscator.exe" /in:"C:\Builds\5\BIMS\Sandbox Branch Private Test Manual Build\Binaries\ProcessBookmarks.exe" /out:"C:\Builds\5\BIMS\Sandbox Branch Private Test Manual Build\Binaries\Obfuscated\" /honor:on /strip:on /prune:off /rename:off /suppress:on /mapout:"ProcessBookmarks.exe.xml" /debug:pdb xcopy /S /R /Y "C:\Builds\5\BIMS\Sandbox Branch Private Test Manual Build\Binaries\Obfuscated\ProcessBookmarks.exe" "C:\Builds\5\BIMS\Sandbox Branch Private Test Manual Build\Binaries\"" exited with code 4."
I have done hours of research, experimentation, and googling on this subject and have not been able to figure out explaination for the error. When I run the build locally the command works just fine. Any help would be greatly appreciated
Edit: I have made several more attempts at getting dotfuscator to work via command line. I have ensured that the dotfuscator command works by itself locally, but when I run the build definition the dotfuscator command line exits with code 1 as follows, and I have no idea how to fix it:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (3717): The command ""C:\Program Files (x86)\PreEmptive Solutions\Dotfuscator Professional Edition 4.9\dotfuscator.exe" /in:"C:\Builds\5\BIMS\Sandbox Branch Private Test Manual Build\Binaries\ProcessBookmarks.exe" /out:"C:\Builds\5\BIMS\Sandbox Branch Private Test Manual Build\Binaries\Obfuscated" /honor:on /strip:on /prune:off /enhancedOI:on /suppress:on /mapout:"C:\Builds\5\BIMS\Sandbox Branch Private Test Manual Build\Binaries\ProcessBookmarks.exe.xml" /debug:pdb" exited with code 1.
I am still having trouble with getting dotfuscator to work in my automated builds, does anyone have an example of how they are doing it. I would really appreciate an answer to this question.