我将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)
答案 0 :(得分:0)
错误表明无法找到程序集' Microsoft.TeamFoundation.Client'。请在构建代理上安装VS2013。或者,您可以安装可从以下网站下载的对象模型:
https://visualstudiogallery.msdn.microsoft.com/3278bfa7-64a7-4a75-b0da-ec4ccb8d21b6
有关详细信息,请参阅documentation。