1

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???

Bunzitop
  • 194
  • 5
  • 19
  • why you don't obfuscate the codes in your machine and put the files for deploying? – Mehdi Khademloo Sep 21 '14 at 04:50
  • Obfuscate your dlls separately and then check them by Reflector to be sure your obfuscator works. – Ali Sepehri.Kh Sep 21 '14 at 04:57
  • yes, if we obfuscate them separately on .Net Reactor's window then it works, but when we try to build setup using these separately obfuscated dlls, Dependency error occurs. – Bunzitop Sep 21 '14 at 05:01
  • When you obfuscate your assemblies it is possible that .NET cannot recognize your dependencies automatically. But what kind of dependency error do you have? It cannot find an assembly? – Ali Sepehri.Kh Sep 21 '14 at 05:06
  • 1
    Also if you want to use previous method, you should use Pre-Build instead of Post-Build. (You shouldn't obfuscate your setup project, do you know this?) – Ali Sepehri.Kh Sep 21 '14 at 05:08

4 Answers4

1

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 !

peter.cyc
  • 1,763
  • 1
  • 12
  • 19
0

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.

Ali Sepehri.Kh
  • 2,468
  • 2
  • 18
  • 27
0

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

Vlad
  • 854
  • 1
  • 10
  • 29
0

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

Eziriz
  • 331
  • 2
  • 5