I want to obfuscate my app with Eazfuscator.NET but I also want to publish it with ClickOnce (I use the Install from CD option). But Eazfuscator only let me obfuscate assemblies and I don't know which assembly to obfuscate when my project is published since there are many of them. Perhaps I need to obfuscate it before publishing it but still not sure how would this be done. Hope anyone can help.
Asked
Active
Viewed 3,672 times
2 Answers
4
Eazfuscator 2.9 & Visual Studio 2010:
- Drag'n'drop the ClickOnce project from Visual Studio onto the green zone of Eazfuscator.NET, so it gets protected on every build. You need to do this just once. Once the protection is set you can build the project over and over again. The corresponding assembly will be automatically obfuscated
- If you have multiple projects in your solution you can apply step 1 for them also, but I suggest to start with a few assemblies as possible
- Switch to Release build configuration. Visual Studio Express users please take note about build configurations
- Publish
Works good for me.

ogggre
- 2,204
- 1
- 23
- 19
3
Here is what I use.
REM run from your publish\Application Files\AAA_w_x_w_z dir
REM Remove the .deploy extensions, so Eazfuscator can find dlls
REM and mage can find .config
REM Use http://www.bulkrenameutility.co.uk/Download.php for this
c:\BRC_Unicode_64\BRC64.exe /PATTERN:*.deploy /RECURSIVE /REMOVEEXT /EXECUTE
REM Protect files
"c:\Program Files (x86)\Eazfuscator.NET\Eazfuscator.NET.exe" -k c:\signing\somesnk.snk dll1.dll dll2etc.dll
REM update hash files and sign
"c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\mage" -Update my.dll.manifest
"c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\mage" -Sign my.dll.manifest -CertFile c:\signing\MyCodeSigning.p12 -Password 1234
REM add the .deploy extension
c:\BRC_Unicode_64\BRC64.exe /PATTERN:*.dll /FIXEDEXT:.dll.deploy /EXECUTE
c:\BRC_Unicode_64\BRC64.exe /PATTERN:*.config /FIXEDEXT:.config.deploy /EXECUTE
c:\BRC_Unicode_64\BRC64.exe /PATTERN:*.gif /RECURSIVE /FIXEDEXT:.gif.deploy /EXECUTE
REM update application file
cd ..
cd ..
"c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\mage" -Update my.vsto -AppManifest "Application Files\my_1_0_0_4\dll1.dll.manifest"
"c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\mage" -Sign my.vsto -CertFile c:\signing\MyCodeSigning.p12 -Password 1234
You run this bat file after publishing.
You'll need to adapt it, of course. Pass Eazfuscator.NET.exe a list of the DLLs you wish to obfuscate.
The "my_1_0_0_4" needs to be changed to match the version published.

JasonPlutext
- 15,352
- 4
- 44
- 84