Does sonarqube scanner support .NET 8 targeted projects?

We updated our build environment to try out .NET 8.0.0-preview.7.23375.6. Since then the sonarqube scanner fails with this error message in the “end” step (the “begin” and “build” step are executed successfully). Does Sonarqube support .NET 8 targeted projects and does it support builds that were created with MSBuild version 17.8 (Breaking change: Version requirements for .NET 8 SDK - .NET | Microsoft Learn)?

[1;34m==> dotnet /Users/Shared/Applications/sonar-scanner-msbuild-net5.0/SonarScanner.MSBuild.dll end /d:sonar.login=***e[m
build	13-Sep-2023 15:58:04	SonarScanner for MSBuild 5.13.1
build	13-Sep-2023 15:58:04	Using the .NET Core version of the Scanner for MSBuild
build	13-Sep-2023 15:58:04	Post-processing started.
error	13-Sep-2023 15:58:04	15:58:04.902  The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
build	13-Sep-2023 15:58:04	15:58:04.902  Generation of the sonar-properties file failed. Unable to complete the analysis.
error	13-Sep-2023 15:58:04	Possible causes:
error	13-Sep-2023 15:58:04	  1. The project has not been built - the project must be built in between the begin and end steps
error	13-Sep-2023 15:58:04	  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
error	13-Sep-2023 15:58:04	  3. The begin, build and end steps have not all been launched from the same folder
error	13-Sep-2023 15:58:04	  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
error	13-Sep-2023 15:58:04	15:58:04.912  Post-processing failed. Exit code: 1

Must-share information (formatted with Markdown):

  • which versions are you using: SonarScanner for MSBuild 5.13.1
  • how is SonarQube deployed: zip
  • what are you trying to achieve: scan .NET 8 targeted project (8.0.0-preview.7.23375.6)

Hello @Christopher_Stephan

I just tried to analyze a class library that targets .NET 8.0.100-rc.1.23455.8 and it works.
Can you share please what type of project you analyze?

Best,
Čaba

Hi Čaba

we are analyzing a .NET MAUI Class Library that targets net8; net8.0-android; net8.0-ios.

Regards
Christopher

Hmm, I did an analysis of a .NET MAUI class library targeting .net 8 and it works for me.

Can you please provide me with the verbose level logs of the build in binary log format?
To get the logs you will need the following parameters: /v:d -bl:build.binlog .