# Monorepo projects

Starting in [Enterprise edition](https://www.sonarsource.com/plans-and-pricing/enterprise/), you can add the SonarQube Server analysis to your Azure build pipeline for a monorepo.

Proceed as follows:

1. If not already done, import your monorepo to create the corresponding projects in SonarQube Server: see [monorepos](https://docs.sonarsource.com/sonarqube-server/2025.2/project-administration/monorepos "mention").
2. For each project, configure the analysis parameters, see **Configuring the project analysis parameters** in [creating-your-project](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/creating-your-project "mention").
3. For each project, set up integration features, see [setting-up-project-integration](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/setting-up-project-integration "mention").
4. Add the SonarQube Server analysis to your YAML pipeline. To do so, see the section corresponding to your project type and use the YAML file example below:
   * [gradle-or-maven-project](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/gradle-or-maven-project "mention")
   * [dotnet-project](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/dotnet-project "mention")
   * [c-family-project](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/c-family-project "mention")
   * [js-ts-go-python-php](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/js-ts-go-python-php "mention")

## Typical YAML file example for a monorepo analysis <a href="#yaml-file-example" id="yaml-file-example"></a>

```css-79elbk
# Template pipeline that build 2 distinct .NET projects, living in 2 separate folders in the repo. We are analyzing them on SonarQube Server, each targets a specific SonarQube Server project.
 
 
trigger:
- master
 
pool:
 vmImage: windows-latest
 
steps:
- task: VisualStudioTestPlatformInstaller@1
 inputs:
   packageFeedSelector: 'nugetOrg'
   versionSelector: 'latestPreRelease'
 
- task: UseDotNet@2
 inputs:
   packageType: 'sdk'
   version: '6.x'
   includePreviewVersions: true
 
- task: NuGetToolInstaller@1
 inputs:
   versionSpec: '5.9.0'
   checkLatest: true
 
- task: DotNetCoreCLI@2
 inputs:
   command: 'restore'
   projects: '**/*.sln'
   feedsToUse: 'select'
 
- task: SonarQubePrepare@7
 inputs:
   SonarQube: '<YourSonarqubeServerEndpoint>'
   scannerMode: 'dotnet'
   projectKey: 'myRepo_myProject1'
 
- task: DotNetCoreCLI@2
 inputs:
   command: 'build'
   projects: 'myproject1/solution.sln'
   arguments: '/nr:false' // this flag is important to avoid DLL lock for the 2nd build/analysis
 
- task: SonarQubeAnalyze@7
 
- task: SonarQubePrepare@7
 inputs:
   SonarQube: '<YourSonarqubeServerEndpoint>'
   scannerMode: 'dotnet'
   projectKey: 'myRepo_myProject2'
 
- task: DotNetCoreCLI@2
 inputs:
   command: 'build'
   projects: 'myProject2/solution.sln'
   arguments: '/nr:false'
 
- task: SonarQubeAnalyze@7
```

* [gradle-or-maven-project](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/gradle-or-maven-project "mention")
* [dotnet-project](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/dotnet-project "mention")
* [c-family-project](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/c-family-project "mention")
* [js-ts-go-python-php](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/js-ts-go-python-php "mention")
* [various-features](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/various-features "mention")
* [quality-gate-status-in-release-pipeline](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/quality-gate-status-in-release-pipeline "mention")
* [sonarqube-tasks](https://docs.sonarsource.com/sonarqube-server/2025.2/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/sonarqube-tasks "mention")
