Running SonarQube analysis for multiple .Net solution in a single GitLab CI pipeline

Must-share information (formatted with Markdown):

  • which versions are you using - “SonarScanner for MSBuild 6.2”
  • how is SonarQube deployed - “It has been manually installed on the build server”
  • what are you trying to achieve - “I have a Gitlab repo with 2 .Net solutions. How do I run SonarScanner for 2 .Net solution in a single Gitlab CI pipeline? Can we run 2 build commands with begin and end statement. In SonarCloud, I have created a single application for this repo. Do I need to create 1 app per solution?”

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

Welcome to the community!

It sounds like you have a monorepo. Yes, you need one SonarQube project per .NET solution. Each will have its own /k:"unique-project-key-value". If you’re using a commercial edition of SonarQube, you may also be interested in the docs on reporting PR status in a GitLab monorepo.

 
HTH,
Ann