问题描述
我正在测试Eziriz .NET Reactor ,以保护使用Visual Studio 2010 C#WPF开发的软件.
I'm testing out Eziriz .NET Reactor to protect a software, developed using Visual Studio 2010 C# WPF.
当.NET Reactor询问要保护哪个程序集时,我感到困惑.我虽然应该保护用户要安装的.msi文件.但是它要求我上传一个程序集文件,它是一个.exe文件.因此,我将.exe上传到我的bin/Debug文件夹中,该文件夹是通过在Visual Studio中构建解决方案而生成的.
I am confused when the .NET Reactor ask to which assembly to protect. I though it supposed to protect the .msi file where user will be installing. But it asks me to upload an assembly file which is an .exe. So I upload the .exe in my bin/Debug folder which is generated by building the solution in Visual Studio.
在.NET Reactor上运行保护后,我使用.NET Reflector打开相同的.exe文件,但仍然可以看到所有的类和方法.什么都没有受到保护.
After running the protection on .NET Reactor, I open the same .exe file with .NET Reflector, and I can still see all the classes and methods. Nothing is being protected at all.
我已经阅读了文档-只是不起作用还是做错了什么?
I have read through the documentation - is it just not working or am I doing something wrong?
推荐答案
Visual Studio通常在进行设置时会重建整个项目.因此,受保护的exe(您生成的.NET Reactor)将被Visual Studio覆盖.
Visual Studio usually rebuilds the entire project when making a setup. Hence your protected exe (that you generated .NET Reactor) will be overwritten by Visual Studio.
您应该添加一个构建后事件(可在Visual Studio项目属性中找到),该事件将在调用DLL之后直接调用.NET反应器来保护DLL.
You should add a Post-build event (which is found in Visual studio Project properties) which calls .NET reactor to protect the DLL directly after it has been built.
请注意,该事件仅应在发布版本中运行,否则您将无法调试应用程序.问题是您不能仅为发布模式添加发布后事件.解决方案是进行如下检查:
Do note that the event should only run for release build, or you'll not bee able to debug your application. The problem is that you can't add a post build event for release mode only. The solution is to do a check like this: How to run Visual Studio post-build events for debug build only
这篇关于.NET Reactor的.NET程序集保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!