We are using SonarQube v10.7 Developer Edition. When I publish results for a mixed C#/C++ project using the SonarScanner.MSBuild + build-wrapper the corresponding branch is not matched and always publishes to master.
This used to work before the upgrade to v10.6/v10.7. I think it was 8.9 LTS.
We are building and analyzing in an Azure DevOps pipeline but for this project it is not using the Sonar Agent Tasks and instead is using command line scripts to make proper use of the build wrapper as that is what the documentation reads.
All other projects that are strictly C# and not using the build wrapper do not have this issue and the branch is published properly.
Is there something new I need to add to the sonarscanner /begin command or build-wrapper?
All other pipelines which are pure C# use the official Sonar AzureDevops Tasks with no special options. The only config is the project key, name, and version.
The integrations pick up the branch/PR properties from your environment and pass them forward automatically. Since your C#/C++ analysis is fully manual, that part will need to be manual too. You’ll need to explicitly set sonar.branch.name in your analysis properties (the begin step, I believe). And for completeness, the docs are here.