InstallShield和ConfuserEx

问题描述 投票:3回答:1

我想使用ConfuserEx混淆我的源代码,所以我创建了一个ConfuserEx项目文件,如下所示:

<project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
    <rule pattern="true" inherit="false">
        <protection id="rename" />
        <protection id="ctrl flow" />
        <protection id="ref proxy" />
        <protection id="anti debug" />
        <protection id="anti dump" />
        <protection id="constants" />
        <protection id="resources" />
        <protection id="anti tamper" />
      </rule>
     <module path="MainApplication\bin\Release\MainApplication.exe" />
     <module path="MainApplication\bin\Release\Component.Hardware.dll" />
     <module path="MainApplication\bin\Release\Component.Log.dll" />
     <module path="MainApplication\bin\Release\Component.Service.dll" />
     <module path="MainApplication\bin\Release\Component.Software.dll" />
     <module path="MainApplication\bin\Release\AsynchronousSocket.dll" />
     <module path="MainApplication\bin\Release\Instrumentation.dll" />  
</project>

由于我想通过设置部署我的应用程序,因此我创建了MainApplication-Project的InstallShield设置。我选择主要输出。

在我在Visual Studio中的Postbuild-Event中,我使用crproj文件作为参数调用Confuser.CLI.exe。但是,只有MainApplication.exeAsynchronousSocket.dll + Instrumentation.dll已经使用ConfuserEx进行了修改。 4组件。*。dll文件不是。我不得不说所有组件都是不同的项目。所以我的项目解决方案结构如下所示:

MyProject
    MyProject.MainApplication
    MyProject.Component.Hardware
    MyProject.Component.Software
    MyProject.Component.Log
    MyProject.Component.Service
    MyProject.AsynchronousSocket
    MyProject.Instrumentation
    MyProject.Setup
    MyProject.sln
    MyProject.crpoj

我的猜测是我使用了InstallShield使用的错误程序集。我还尝试在MyProject.Component.Service\bin\ReleaseMyProject.Component.Service\obj\Release中进行组装,但这些选项都不起作用。我不认为使用MainApplication\obj\Release是有效的,因为只有MainApplication.exe位于。

任何人都可以告诉我InstallShield从哪里获取主要输出或我错过了其他什么?

c# .net obfuscation installshield
1个回答
0
投票

一个可能的解决方案是多个crproj文件,每个二进制文件一个,并在EACH项目的后期构建步骤中指定项目特定的crproj文件。 MainApplication.crproj

<project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
    <rule pattern="true" inherit="false">
        <protection id="rename" />
        <protection id="ctrl flow" />
        <protection id="ref proxy" />
        <protection id="anti debug" />
        <protection id="anti dump" />
        <protection id="constants" />
        <protection id="resources" />
        <protection id="anti tamper" />
      </rule>
     <module path="MainApplication\bin\Release\MainApplication.exe" />
</project>

Component.Hardware.dll.crproj

<project baseDir="." outputDir="." xmlns="http://confuser.codeplex.com">
    <rule pattern="true" inherit="false">
        <protection id="rename" />
        <protection id="ctrl flow" />
        <protection id="ref proxy" />
        <protection id="anti debug" />
        <protection id="anti dump" />
        <protection id="constants" />
        <protection id="resources" />
        <protection id="anti tamper" />
      </rule>
     <module path="MainApplication\bin\Release\Component.Hardware.dll" />
</project>
© www.soinside.com 2019 - 2024. All rights reserved.