yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.55k stars 1.62k forks source link

ConfuserEx in combination with Installshield doesn't obfuscate all assemblies. #376

Open Sjeijoet opened 8 years ago

Sjeijoet commented 8 years ago

When trying to obfuscate the assemblies of a project before compiling a setup package using the Installshield Limited Edition for Visual Studio, not all assemblies in the installpackage turn out obfuscated.

I've created a batch file for the solution (obfuscate.bat):

if %1 == Release "C:\ConfuserEx\Confuser.CLI" %2

And a post-build event for the projects to obfuscate:

$(SolutionDir)obfuscate $(ConfigurationName) "$(ProjectDir)$(ProjectName).crproj"

I need to define those in post-build events, since building an installpackage also triggers a new build of the solution. But built and obfuscated projects that are referenced by other projects, cause the other projects to get compile errors since their references aren't readable.

I've also created a single crpoj configuration file for the entire application, but I can't replace all the original assemblies with the obfuscated assemblies. Above all; ConfuserEx should only run after every project has been build, but there's no possibility for a solutionwide post-build event.

Is this a known issue for install packages and do you perhaps have a solution?

yck1509 commented 8 years ago

Hi, Since I'm not familiar with InstallShield, so I can't give specific advice about it. However, I'll suggest you to create a build script (e.g. *.bat) to automate the release procedure (i.e. use MSBuild to build the solution in Release configuration, then obfuscate the assemblies and compile a setup package).