简体   繁体   English

使用 .Net Reactor 在 VS2010 中创建混淆设置

[英]Create Obfuscated Setup in VS2010 Using .Net Reactor

I am using .Net Reactor To Obfuscate my project.我正在使用 .Net Reactor 来混淆我的项目。 In my project I have about 10 dlls.在我的项目中,我有大约 10 个 dll。 I want my setup to deploy the obfuscated dlls in client's machine.我希望我的设置在客户端的机器上部署混淆的 dll。

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.但是当我部署它并尝试在 Reflector 中打开部署的 dll 时,它会打开并显示代码。 Where/What am i missing???我在哪里/我错过了什么???

Dot Net Reactor obfuscates exe's and dll's and stores them in a different location. Dot Net Reactor 混淆了 exe 和 dll,并将它们存储在不同的位置。 Default is the sub folder Secured where the assemblies were.默认是程序集所在的子文件夹 Secured。 Be sure to take the secured ones and not the original ones in your deployment scheme !确保在您的部署方案中使用安全的而不是原始的!

You should obfuscate your assemblies before building your setup project, therefore you should use your command in Pre-Build instead of Post-Build.您应该在构建安装项目之前混淆您的程序集,因此您应该在 Pre-Build 而不是 Post-Build 中使用您的命令。 When you obfuscate your assemblies it is possible that .NET cannot recognize your required assemblies automatically.当您混淆程序集时,.NET 可能无法自动识别您所需的程序集。 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.注意:在 VS2010 中创建安装项目存在一些错误,有时会关闭和打开 Visual Studio 工作。

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:如果你想设置 config proj 然后像这样添加它:

-project "$(SolutionDir)obfuscation_settings.nrproj"

Given that .net reactor project is placed in solution folder and its name obfuscation_settings.nrproj鉴于 .net reactor 项目位于解决方案文件夹中,其名称为 obfuscation_settings.nrproj

Good luck祝你好运

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.您可以使用 .NET Reactor VS Add-in 在适当的时候混淆程序集。 The solution is described here: Solution此处描述了解决方案解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM