0

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.

Mc Kevin
  • 962
  • 10
  • 31
  • 1
    Hi, don't you see a small flag on your existing steps in your build definitions? Because we increase the major version of the tasks in the v4 of the extension, you have to opt-in to benefit from the new version of the task. – Fabrice - SonarSource Team Feb 09 '18 at 09:54

1 Answers1

0

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

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55