.NET 6 project scan does not work

Thank you for your quick response.
I guess we use an on-premise version of SonarQube, since it states Enterprise Edition Version 8.9.1 (build 44547) which seems comparably old. Unfortunately I am a developer and only responsible for the build pipeline and our IT department seems a bit conservative with SonarQube updates, since there are a lot of different projects within our company that use SonarQube for analysis and they do not want to break it out of nothing for any team. But if SonarQube 9.2 is already released and already capable for the new features, I will request an update.

But still I am a bit confused with the current issue itself. If I understand you correctly the main problem on client side is that the Sonar-Scanner needs the .NET 5 runtime to be installed and code must not use C#10 features. Both requirements are satisfied for us but still Sonar-Scanner fails at some point since using .NET 6 in projects with: The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.

Is this a known issue that will be fixed with complete .NET 6 support or do you want me to file a separate ticket, since the error message seems very generic and might not be related to .NET 6?

1 Like

Hi @czdietrich

I’ve moved this to a separate topic to comply with our FAQ - SonarSource Community

Could you please share with us the debug logs?

Please give us the following version information:

  • what is the version of SonarQube that you are using?
  • what is the version of the Scanner for .NET (MSBuild) that you are using?
  • what version of MSBuild are you using?

And we’ll need the logs:

  • please give us the verbose output of the scanner commands (please run SonarScanner.MSBuild.exe begin /k:“MyProject” /d:sonar.verbose=true as the begin step, and please attach the output of the BEGIN and END steps)
  • please give the output of running MSBuild in verbose mode (/v:d)

Also, please tell us:

  • what are the commands you are running to do the analysis?
  • are you running all commands from the same folder?

Hi @Andrei_Epure,

as it turned out the issue was on our side. There was an unintended side effect that made the Sonar-Begin step running after the Build step which had nothing to do with moving to .NET 6. It just happend in the same time frame so we incorrectly expected it to be a .NET 6 bug.

I’m sorry for the inconvenience, I was not fast enough to reply in time in the main thread that we found the issue. Thank you very much for your time and help, I think we can close this ticket.

If I could make a wish, it would be nice to make the error message more clearly that unable to collect the required information probably means that the SonarQube MSBuild hooks did not run at all.

Again thank you.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.