【问题标题】:Dotfuscator with Xamarin android fails build after Analyzing markup分析标记后,带有 Xamarin android 的 Dotfuscator 构建失败
【发布时间】:2018-01-04 19:03:53
【问题描述】:

我正在尝试将 Dotfuscator 社区版与 Visual Studio 2017 一起使用来构建 Xamarin for Android 应用程序。 Visual Studio 输出给了我错误:

1>C:\xp\XamarinForms\XamarinForms\XamarinForms.Android\PreEmptive.Dotfuscator.Xamarin.targets(347,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\PreEmptiveSolutions\DotfuscatorCE\dotfuscatorCLI.exe" /p:InDir="obj\Release\DotfuscatorXamarin\dfin",OutDir="obj\Release\DotfuscatorXamarin\dfout",ReportDir="DotfuscatorReports\Release" "DotfuscatorConfig.xml"" exited with code 1.

当我使用 cmd.exe 运行该命令时,我有以下输出:

[Build Output] Resolving method references...
[Build Output] Analyzing Markup...
[Build Output] Value cannot be null.
Parameter name: key
[Build Output] Build Error.

我在 Dotfuscator GUI 应用程序中打开了 DotfuscatorConfig.xml 并尝试更改一些选项。 在我在重命名->选项->启用重命名中禁用重命名后,构建成功,但如果不重命名,它会使混淆变得毫无意义。

你能帮我找出这个问题的确切原因以及如何解决它吗?

【问题讨论】:

  • 这将是 PreEmptive Solutions 最能提供帮助的事情,因为他们的产品和 CLI 工具出现了故障。是否有办法增加此 CLI 的详细程度可能值得一看。
  • 好奇...在您“禁用”重命名之前和之后,DotfuscatorConfig.xml 中的 部分是什么样的?我没有玩过他们的 GUI——宁愿设置 XML。对我来说,这听起来像是他们的 GUI 中的一个错误。
  • @JonDouglas 作为参考,您可以通过命令行开关/vby setting the Build output verbosity of the config file to Verbose 增加Dotfuscator 的详细程度。
  • 谢谢@JoeSewell 我想会有这样的选择。

标签: windows xamarin xamarin.android visual-studio-2017 dotfuscator


【解决方案1】:

免责声明:我在 Dotfuscator 团队的 PreEmptive Solutions 工作,并以该身份回答这个问题。)

更新 (2018-03-15):Dotfuscator Community Edition 5.34.0 中提供了针对此问题的修复(changelog,请注意“标记分析”修复)。您可以随时下载最新版本的 Visual Studio 2017 here

在此版本之前编写的上一个答案如下。


这似乎是最近在 Dotfuscator Professional Edition 4.33.0 (changelog) 中修复的标记分析错误。虽然此修复程序当前未在 Community Edition 5.32.1(Visual Studio 2017 15.5 附带的版本)中发布,但现在您可以禁用标记分析作为解决方法。这比完全关闭重命名要好。

要禁用标记分析,请将名称为 disable_markup_analysis 和值 true 的项目属性添加到 Dotfuscator 配置文件。您可以使用Community Edition GUI 来执行此操作,或者,如果您愿意,可以直接编辑配置文件:

  1. 在文本编辑器中打开 DotfuscatorConfig.xml 文件。
  2. 在根<dotfuscator> 部分中,添加一个子<propertylist> 标记及其关闭</propertylist> 标记(如果它们尚不存在)。
  3. <propertylist> 部分中,添加标签<property name="disable_markup_analysis" value="true" />

【讨论】:

    猜你喜欢
    • 2017-11-01
    • 2019-06-17
    • 1970-01-01
    • 1970-01-01
    • 2020-01-03
    • 1970-01-01
    • 2018-05-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多