【问题标题】:No code coverage result during the integration of SonarQube with TFSSonarQube 与 TFS 集成期间没有代码覆盖结果
【发布时间】:2016-11-07 17:48:56
【问题描述】:

我将 SonarQube 5.6 与 TFS 2013 终极版连接,使用 MSBuild 分析代码。在构建期间,收到关于 No code coverage Results 的错误。我在构建定义中启用了代码覆盖率。请检查错误并提出一些建议。

Error:
No code coverage results
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
 at SonarQube.TeamBuild.Integration.CoverageReportUrlProvider.GetCodeCoverageReportUrls(String tfsUri, String buildUri, ILogger logger)
 at SonarQube.TeamBuild.Integration.TfsLegacyCoverageReportProcessor.TryGetBinaryReportFile(AnalysisConfig config, TeamBuildSettings settings, ILogger logger, String& binaryFilePath)
 at SonarQube.TeamBuild.Integration.CoverageReportProcessorBase.ProcessCoverageReports()
 at SonarQube.TeamBuild.PostProcessor.CoverageReportProcessor.ProcessCoverageReports()
 at SonarQube.TeamBuild.PostProcessor.MSBuildPostProcessor.Execute(String[] args, AnalysisConfig config, TeamBuildSettings settings, ILogger logger)
 at SonarQube.TeamBuild.PostProcessor.Program.Main(String[] args)
 Exception Message: TF270015: 'MSBuild.SonarQube.Runner.exe' returned an unexpected exit code. Expected '0'; actual '255'. See the build logs for more details. (type UnexpectedExitCodeException)
Exception Stack Trace:    at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

【问题讨论】:

  • 你的构建代理机器上安装了 VS 2013 吗?

标签: tfs msbuild sonarqube


【解决方案1】:

错误表明找不到程序集“Microsoft.TeamFoundation.Client”。请在构建代理上安装 VS2013。或者,您可以安装可以从以下网站下载的对象模型:

https://visualstudiogallery.msdn.microsoft.com/3278bfa7-64a7-4a75-b0da-ec4ccb8d21b6

请参阅documentation 了解更多信息。

【讨论】:

  • 是的,你们说得对,我有一个 2012。我用团队资源管理器安装了 2013。它工作正常,但出现关于 ProjectInfo.xml 文件的第二个错误。在下面检查:
猜你喜欢
  • 1970-01-01
  • 2018-01-11
  • 2014-07-23
  • 2019-01-29
  • 2016-10-29
  • 1970-01-01
  • 2014-08-19
  • 2015-08-08
  • 1970-01-01
相关资源
最近更新 更多