@ganncamp we are using enterprise edition and we are already using the Application feature jest checked to know if there is any feature so that we can avoid the overhead of maintaining 50 + projects in SonarQube.
So jest to clarify if i am using standalone scanner or scanning java projects is it possible ?
The scanner supports building multiple solutions/MSBuild projects between begin and end. All of the results will be pushed to a single Sonar project e.g.
build solution/ MSBuild project 1
build solution/ MSBuild project 2
If I remember correctly, it is also possible to push results to multiple Sonar project from a single pipeline e.g.
build solution 1
end // -> push results to Sonar project A
build solution 2
end // -> push results to Sonar project B
There are two main limitations that I can think of. The first is imposed by SonarQube/SonarCloud, which do not support partial analyses of a Sonar project i.e. when you push analysis results to the server, it completely replaces the results from the previous analysis. So you have to push all the data for a Sonar project in one go.
The second limitation is on the SonarScanner for .NET side, which is that it assumes that everything between the begin and end is built as part of a single agent job i.e. one a single machine under a common root directory. The scanner doesn’t support building/testing in parallel on multiple machines and then combining the results before pushing them to the server.
How our pipeline is we have 50 projects in a single repository each folder is considered as a single project. We have a yml file outside the folders which is applicable for all the projects. if we need to build 2 project we will go to azure devops pipeline and select project name which is parameterized.
Each project will run in separate jobs.
So what happens is as we are giving same project key results in sonarqube is replaced by recent build one.
Ok, that’s clearer. You would need to parameterise the Sonar project key too so that each MSBuild project has a separate Sonar project key (either using the project parameter directly, or calculating the Sonar project key from it).