3

We started to use VS2019 and all the new things that comes with. We noticed that the build manager doesn't work anymore:

The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
  1. The project has not been built - the project must be built in between the begin and end steps
  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 and 15.0 are supported
  3. The begin, build and end steps have not all been launched from the same folder
  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)

I checked, but I thing I've the latest version of SonarScanner installed. I'm kind of stuck, how to execute all our tests if we use some things of the MSBUILD V16(2019) compiler, but sonar cube doesn't seems to be compatible?

Is there a workaround?

Thanks

J4N
  • 19,480
  • 39
  • 187
  • 340
  • Not familiar with Sonar Scanner, but according to your error message: It complains that it now supports VS2015 and VS2017 but not VS2019. Maybe you can try installing Build Tools for VS2017 to check if it helps. – LoLance Jun 03 '19 at 07:57
  • @LanceLi-MSFT Yes, but we(not me) upgraded our build machine to use VS2019 build tools instead of VS2017, because there some new features(I dont remember which) that were compiling on VS2019 but not with VS2017 :( – J4N Jun 03 '19 at 08:10
  • The message is incorrect: MSBuild has been supported since v4.6 of the Scanner (https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/4.6.0.1930). If you are using SDK-style MSBuild projects then you will need to either add a ProjectGuid to each project or build a .sln as described in the docs (https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild). – duncanp Jun 04 '19 at 15:15
  • @duncanp, we use .net framework, not .net core, so i'm not sure it applies? I'm building a SLN, not sure to understand what you mean by a projectGuid, I want to have the whole solution, not only one project. – J4N Jun 04 '19 at 19:12
  • 1
    @J4N if you're building the .sln file then you can ignore the part about ProjectGuids. Just to be clear, the Sonar Scanner for MSBuild v4.6 and later does work with the VS2019 build tools. Earlier versions won't work and will give the output you've quoted in the question. Double-check the version of the scanner you are using; it will be in the output a few lines above the output you've quoted. – duncanp Jun 07 '19 at 16:42
  • any solution on this as currently trying to work on the same and facing the same issue. – Aditya Pewekar Apr 29 '20 at 13:01

0 Answers0