How to scan multiple Project dotnet sln files using sonarscanner for msbuild

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube - 9.9 LTS
    SonarScanner for MSBuild 5.13.0 .Net FWK 4.6
  • how is SonarQube deployed: zip, Docker, Helm
    .zip
  • what are you trying to achieve
    we have requirement
    that we build multiple projects in parallel in one single bitbucket
    repo, so I need to run my sonarqube project analysis on all these
    folders and want to push one single final scanned report to Sonarqube,
    Can you please help me on how we can get this achieved. Previously we
    have used sonarqube version 6.7.5 and in that by using simple sonar
    scanner we use to add the inclusions and exclusions and get the scan
    report for all the languages in one single job, but after moving to
    latest LTS Version the these c# things are not straightforward it
    seems. So can you help me with the solution for this.
  • what have you tried so far to achieve this
    At this point we are only able to build and scan single project file and get the scan report published to the sonar repo.

Hi,

Typically it’s going to be one SonarQube project per build, but that’s only a strict requirement for C#.

Can you elaborate on your repo structure? You talk of “project” files. How many solution files do you have?

 
Thx,
Ann