Create Obfuscated Setup in VS2010 Using .Net Reactor

3.3k Views Asked by At

I am using .Net Reactor To Obfuscate my project. In my project I have about 10 dlls. I want my setup to deploy the obfuscated dlls in client's machine.

I tried putting the code below in Post-Build Event at Properties of the setup Porject.

"C:\Program Files\Eziriz\.NET Reactor\dotNET_Reactor.exe" -project "E:/s.nrproj"

But when i deploy it and try to open the deployed dlls in Reflector, it Opens and show the code. Where/What am i missing???

4

There are 4 best solutions below

0
On

You should obfuscate your assemblies before building your setup project, therefore you should use your command in Pre-Build instead of Post-Build. When you obfuscate your assemblies it is possible that .NET cannot recognize your required assemblies automatically. I strongly recommend that obfuscate your assemblies separately and then create your setup project (ensure that all of required assemblies are added to your project).

NOTE: There is some bugs about creating setup project in VS2010, sometimes closing and opening the visual studio works.

0
On

This works on my side:

if /I "$(ConfigurationName)" == "Release" "C:\Program Files (x86)\Eziriz\.NET Reactor\dotNET_Reactor.Console.exe" -file "$(TargetPath)" -targetfile "$(TargetPath)" -q

and if you want to set config proj then add it like this:

-project "$(SolutionDir)obfuscation_settings.nrproj"

Given that .net reactor project is placed in solution folder and its name obfuscation_settings.nrproj

Good luck

0
On

Dot Net Reactor obfuscates exe's and dll's and stores them in a different location. Default is the sub folder Secured where the assemblies were. Be sure to take the secured ones and not the original ones in your deployment scheme !

0
On

The Post-build event doesn't work in this case. You can use the .NET Reactor VS Add-in in order to obfuscate the assemblies at the right time. The solution is described here: Solution