See https://docs.sonarqube.org/display/SONAR/Documentation for current functionality
You must have previously installed and configured SonarQube Scanner for MSBuild and read Analyzing Code Source.
Steps to Analyze a Project from the Command Line
For those already familiar with SonarQube, here are the steps required to analyze projects:
- Install the SonarQube Server (see Setup and Upgrade for more details)
- Install the SonarQube Scanner for MSBuild
- Install the C# Plugin, and the VB.NET plugin if you want to analyze a VB.NET project (see Installing a Plugin for more details)
- On the machine where you are going to run the analysis, you have to install the Microsoft .NET Framework v4.5.2+
- Open a Developer Command Prompt for Visual Studio 2013 or higher
- Put yourself in the root folder of the project you want to analyze (a sample project, available on GitHub, can be browsed or downloaded: projects\languages\vbnet)
Run the following commands:
MSBuild.SonarQube.Runner.exe begin /k:"sonarqube_project_key" /n:"sonarqube_project_name" /v:"sonarqube_project_version"
- Build the project, for example:
- Follow the link provided at the end of the analysis to browse your project's quality in SonarQube UI (see: Browsing SonarQube)
Steps to Analyze a Project from Team Foundation Server - VSO
SonarQube Scanner is compatible with TFS 2013, 2015 and VSO
Detailed instructions to analyze .NET projects from Team Foundation Server can be found in the "SonarQube Setup Guide For .NET Users".
Steps to Analyze a Project from Jenkins
Detailed instruction to analyze .NET project from Jenkins can be found in Installing and Configuring SonarQube Scanner for Jenkins.
See SonarQube Scanner for MSBuild Configuration to have more details about how to configure SonarQube Scanner for MSBuild.