【问题标题】:Missing SonarQube for MS Build 4.0 build step in TFS build stepsTFS 构建步骤中缺少用于 MS Build 4.0 构建步骤的 SonarQube
【发布时间】:2023-03-07 11:52:01
【问题描述】:

Sonarqube 工作正常,直到我尝试使用 Xunit 测试扫描一个新项目并收到此错误:

error MSB4062: The "IsTestFileByName" task could not be loaded from the assembly C:\temp\ConsoleApp2017\.sonarqube\bin\SonarQube.Integration.Tasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0 

根据https://jira.sonarsource.com/browse/SONARMSBRU-310

似乎我们需要在 tfs 中将 MSBuild 的 SonarQube Scanner 升级到 v4.0。 https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube#overview

这就是我们所做的,升级完成并安装,但我们没有看到新扫描仪的任何新构建步骤,它仍然显示为 版本:3.0.0

我们正在使用:

Java 8 on both SonarQube server and scanner
SonarQube Version 6.2
SonarQube Scanner for MSBuild 3.0
Sonar C# 6.1.0.2359
MSBuild 15.0
TFS Version 14.114.26403.0

尝试重新启动 tfs 服务器,但没有成功。

【问题讨论】:

  • 嗨,您没有在构建定义中的现有步骤上看到一个小标志吗?因为我们在扩展的 v4 中增加了主要版本的任务,所以您必须选择加入才能从新版本的任务中受益。

标签: tfs sonarqube azure-pipelines-build-task sonarqube-msbuild-runner


【解决方案1】:

只需尝试使用 Fabrice 提到的 版本 4

此外,您可以参考this link 获取 SonarQube Scanner for MSBuild 4.0。

【讨论】:

    猜你喜欢
    • 2017-06-22
    • 2023-03-22
    • 2018-07-08
    • 2016-04-21
    • 2016-08-14
    • 1970-01-01
    • 2017-03-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多