0

我有crproj文件并且有混淆器的设置:

<?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>

我在预构建配置中运行它:

if "$(ConfigurationName)" == "ReleaseDC" $(SolutionDir)Installers\ConfuserEx\Confuser.CLI.exe $(ProjectDir)Confuser.crproj

执行成功,但没有带结果的输出文件夹。此外,当我添加一些模块时,<module> path</module>我收到以下错误“严重代码描述项目文件行抑制状态错误命令“REM 删除并重新创建源文件夹

  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 

所以我被困住了,文档没有帮助。

4

1 回答 1

0

第一个问题实际上是baseDir没有有效的路径。BaseDir应该是 DLL 所在的文件夹的路径,并且应该是混淆的 DLL 所在的输出。而且它不能在预构建脚本中执行,只能在构建后执行

于 2021-02-08T06:18:04.163 回答