I have crproj
file and there is setup for confuser:
<?xml version="1.0" encoding="utf-8"?>
<project baseDir="C:\Users\sserbula\Desktop\Projects\telexis\TSU\Installers" outputDir="C:\Users\sserbula\Desktop\Projects\telexis\TSU\Installers\ConfuserTest" xmlns="http://confuser.codeplex.com">
<rule preset="normal" pattern="true">
<protection id="anti debug" />
<protection id="anti dump" />
<protection id="anti ildasm" />
<protection id="anti tamper" />
<protection id="constants" />
<protection id="ctrl flow" />
<protection id="invalid metadata" />
<protection id="ref proxy" />
<protection id="rename" />
<protection id="resources" />
</rule>
</project>
I am running it in pre-build config:
if "$(ConfigurationName)" == "ReleaseDC" $(SolutionDir)Installers\ConfuserEx\Confuser.CLI.exe $(ProjectDir)Confuser.crproj
Execution is successfull, but there is no output folder with result. Also, when I add some modules <module> path</module>
I get following error `Severity Code Description Project File Line Suppression State
Error The command "REM Delete and recreate source folder
if exist "C:\Users\sserbula\Desktop\Projects\telexis\TSU\Installers\FilesToPackageDC\ReleaseDC" rd "C:\Users\sserbula\Desktop\Projects\telexis\TSU\Installers\FilesToPackageDC\ReleaseDC" /s /q
md "C:\Users\sserbula\Desktop\Projects\telexis\TSU\Installers\FilesToPackageDC\ReleaseDC"
REM Copy ChangeNotes.txt
xcopy /i /q /y /c "C:\Users\sserbula\Desktop\Projects\telexis\TSU\ChangeNotes.txt" "C:\Users\sserbula\Desktop\Projects\telexis\TSU\Installers\FilesToPackageDC\ReleaseDC\"
if "ReleaseDC" == "ReleaseDC" C:\Users\sserbula\Desktop\Projects\telexis\TSU\Installers\ConfuserEx\Confuser.CLI.exe C:\Users\sserbula\Desktop\Projects\telexis\TSU\Installers\Telexis.DC.Installer\Confuser.crproj" exited with code 1. Telexis.DC.Installer C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets 779
So I am stuck and documentation isn't helping.
First problem was in fact that baseDir
doesn't have valid path. BaseDir
should be path to folder where DLLs are and output where obfuscated DLLs should be.
And it couldn't be executed in pre-build script, only post-build