关于C#:EAZfuscator无法自动运行

EAZfuscator not working automatically

我有一个使用.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中进行构建。

搜索网络无济于事,因此,如果有人在之前遇到过此问题,可能可以解决此问题。


最终设法修复了它。似乎禁用用户帐户控制可以解决此问题。

快速的Google搜索将提供有关执行此操作的更多详细信息。


Eazfuscator将此行添加到项目的PostBuildEvent(为清晰起见,用Word包裹起来,但这是一行)。 (右键单击Project-> Properties-> Build Events。)

1
2
3
4
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

检查它是否存在以及您的发行版配置是否真的称为"发布"。


如果您使用的是TFS之类的版本控制系统,则.csproj文件可能已锁定。
因此,您必须通过签出文件或从文件属性中取消选中"只读"框来解锁文件。