Missing SonarQube for MS Build 4.0 build step in TFS build steps

748 Views Asked by At

Sonarqube was working fine until I'm trying to scan a new project with Xunit tests and got this error:

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 

according to https://jira.sonarsource.com/browse/SONARMSBRU-310

it seems like we need to upgrade to SonarQube Scanner for MSBuild to v4.0 in tfs. https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube#overview

Which is what we did and the upgrade went through, installed, but we're not seeing any new build steps for the new scanner, it's still showing up as Version: 3.0.0

We're using:

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

Tried restarting the tfs server but no luck.

1

There are 1 best solutions below

0
Andy Li-MSFT On

Just try using version 4 as Fabrice mentioned:

Besides, you can refer to this link to get the SonarQube Scanner for MSBuild 4.0.

enter image description here