我有一个使用 .Net Framework 4 的 C# 2010 WinForms 应用程序。
我正在使用 Eazfuscator.NET混淆此应用程序。如果我手动混淆可执行文件,一切正常。
当我尝试通过将项目拖到绿色部分来使程序在每次构建时混淆自身时,一切正常,这是输出:
Protecting project 'Roster Manager.csproj'... done
Protected project will be obfuscated automatically during the build in Release configuration
Please restart Visual Studio to complete the installation of Eazfuscator.NET
之后,我关闭 VS,重新启动它,清理解决方案,重建它并运行它。该程序可以运行,但它没有被混淆,使用Reflector 7 对其进行反编译证明了这一点。 .
我正在按照程序的要求在 Release 中构建它。
在网上搜索没有帮助,所以如果有人以前遇到过这个问题,也许可以解决这个问题。
最佳答案
Eazfuscator 将这一行添加到您项目的 PostBuildEvent(为便于阅读而换行,但它是一行)。 (右键单击项目 -> 属性 -> 构建事件。)
if /I "$(ConfigurationName)" == "Release" Eazfuscator.NET.exe "$(TargetPath)"
--msbuild-project-path "$(ProjectPath)" --msbuild-project-configuration "$(ConfigurationName)"
--msbuild-project-platform "$(PlatformName)" --msbuild-solution-path
"$(SolutionPath)" -n --newline-flush -v 3.2
检查它是否存在以及您的发布配置是否真的称为“发布”。
关于c# - EAZfuscator 无法自动工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10863663/