无法将下载的代码覆盖工具转换为 XML

Failed to convert the downloaded code coverage tool to XML

我在 TFS 2013 上启用了代码覆盖。我使用 MSBuild.SonarQube.Runner 1.0.1。当我运行分析的结束阶段。我收到以下错误消息:

    11:36:00.269  Failed to convert the downloaded code coverage tool to XML. No code coverage information will be uploaded to SonarQube.<br/>
     Check that the downloaded code coverage file (C:\Builds\[product name]\System_Main_Release_Code_Analysis\.sonarqube\out\VSCodeCoverageReport.coverage) is valid by opening it in Visual Studio. If it is not, check that the internet security settings on the build machine allow files to be downloaded from the Team Foundation Server machine.
     Post-processing failed. Exit code: 1
An error occurred while copying diagnostic activity logs to the drop location. Details: Forbidden

在生成服务器上没有 VSCodeCoverageReport.coverage 文件 - 至少在指定的位置没有那个名称。但是,当我在 TFS 构建摘要中单击(覆盖率结果)时,会下载一个覆盖率文件,该文件会在代码覆盖率结果 Window.

中的 Visual Studio 中打开

可能是什么问题?

问题已解决。 构建代理上的代理设置已更改。这导致对 TFS 服务器或任何本地地址的 http 请求失败。
弄清楚这一点特别具有挑战性,因为告诉您构建的所有详细信息的代理构建日志是无法传输到放置位置的文件。

所以我使用了来自 Sysinternals 的 ProcMon,并在构建期间启用了文件监视器。过去成功的构建与当前失败的构建之间的比较显示缺少哪个文件(代理日志文件)。在 ProcMon 中搜索此文件会发现该文件在构建代理上的位置。特工日志文件包含 Dinesh 在试图帮助我时寻找的 Downloading coverage file from {0} to {1} 行。粘贴到浏览器中的 http 地址显示 "Access denied" 消息。
从那里分析代理设置是合乎逻辑的步骤。最终解决它的方法是在局域网 (LAN) 设置中选中“绕过本地地址的代理服务器