Click here to Skip to main content
15,917,862 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello dear's.......................

Can anyone tell me about how to create a setup package for obfuscated code in C# Windows Application?

Thanks in advance,

Gaurav kumar
Software Developer
Updated 12-Jan-11 1:52am

You will typically need to obfuscate the assemblies AFTER they are built but BEFORE they are put in the setup package. This can be done using MSBUild integration of the obfuscation step in your build process. See Crypto Obfuscator which supports this scenario.
Share this answer
What obfuscation package? Have you asked the manufacturer of the obfuscation package for help?
Share this answer
Well you can create Merge Module (msm file) for obfuscated code and later when you will create the installer (msi file) just merge the msm here...

Follow this MSDN[^] page to get the idea about MSM and MSI and how to create them. :)
Share this answer
I agree with jmcc2k above. However, if you don't have a sophistocated Obfuscator and/or yo don't want to mess with editing the MSBuild, then you can try my solution below.

If you are using the included Dotfuscator CE in Visual Studio, a relatively easy (but cumbersome) way to do it is:
1) Build your executable the normal way.
2) Run Dotfuscator.
3) Using Windows Explorer, manually overwrite the exe you generated from step 1 above with the one generated by the Dotfuscator (i.e., copy the Dotfuscated exe and paste it where the original exe file is, which is probably in your Release folder).
4) Create a setup project and build that. The setup project will see the exe file and won't care that it came from Dotfuscator.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900