SonarScanner for MSBuild version 3.0 issue

We have upgraded Sonarqube to developer edition recently. After the update, we are using the Bamboo Tasks – Sonar Scanner for MSBuild Begin Analysis and Sonar Scanner for MSBUild End Analysis with MSBuild Task in between these two.

The build is failing with the below error.

The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
error 26-Feb-2020 15:07:05 Possible causes:
error 26-Feb-2020 15:07:05 1. The project has not been built - the project must be built in between the begin and end steps
error 26-Feb-2020 15:07:05 2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 upwards are supported
error 26-Feb-2020 15:07:05 3. The begin, build or end steps have not all been launched from the same folder

We are using the below versions.

  1.   MSBuild 14.0 for the MSBuild Task in between the two Sonar Scanner Tasks.
    
  2.   Sonar Scanner for MSBuild version 3.0.0.629 for the Tasks Sonar Scanner for MSBuild (Begin Analysis) and Sonar Scanner for MSBUild (End Analysis).
    

3.We are using Sonar Qube developer edition version 6.7.1.

The error message tells us that MSBuild 14.0 upwards is supported. Could you please confirm if MSBuild 14.0 is included as well in the support for Sonar Scanner for MSBuild version 3.0.0.629

Hey there,

  • The Scanner for MSBuild v3.0 came out 3 years ago. The latest version is v4.8 – let’s bring you into the modern day!
  • SonarQube v6.7 LTS is EOL, and you should upgrade to SonarQube v7.9 LTS at your earliest convenience

If, after upgrading your Scanner for MSBuild you still face an issue, I’d reccomend attaching logs that include the begin step, the build, and the end step. MSBuild 14 remains supported in the latest version.