InstallShield and ConfuserEx
I want to confuse the source code with ConfuserEx, so I created a ConfuserEx project file that looks like this:
<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>
Since I want to deploy my application using a setup, I created an InstallShield Setup for my MainApplication-Project. I choose the primary conclusion.
In my postbuild event in Visual Studio, I call the Confuser.CLI.exe file with the file crproj parameter. However, only MainApplication.exe
and AsynchronousSocket.dll + Instrumentation.dll
have been changed using ConfuserEx. 4-component. *. DLL files are missing. I have to say that all meetings are different projects. So my project structure looks like this:
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
I am assuming that I am taking the wrong assemblies used by InstallShield. I also tried to take assemblies in MyProject.Component.Service\bin\Release
and MyProject.Component.Service\obj\Release
, but none of those options worked. I don't think using it MainApplication\obj\Release
works because there is only MainApplication.exe
.
Can anyone tell me where InstallShield is getting the main output from or if I'm missing something else?
source to share
A possible solution is to have multiple crproj files, one for each binary, and specify the project-specific crproj file in the post-build step in EVERY project. 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>
source to share