|By SonarSource – MIT –
Issue Tracker –
SonarQube Scanner for MSBuild 2.0 – Compatible with SonarQube 4.5.4+ (LTS)
The SonarQube Scanner for MSBuild is the recommended way to launch a SonarQube analysis on MSBuild projects and solutions. It is the result of a collaboration between SonarSource and Microsoft.
It is available both as a standalone command line executable and as build steps for Team Foundation Server or Jenkins.
- SonarQube is already installed
- The latest version of the SonarQube C# plugin or SonarQube VB.NET plugin is already installed on your SonarQube instance
- You are able to build your project using MSBuild 14.0. See the Compatibility with Visual Studio and MSBuild section below
- You have read Analyzing Code Source
With the SonarQube C# and Visual Basic .NET plugins
SonarQube Scanner for MSBuild
|SonarQube C# Plugin||4.0||4.1||4.2||4.3+||4.4+||4.5+|
|SonarQube Visual Basic.NET Plugin||N/A||2.4||2.4||2.4+||2.4+||2.4+|
With Visual Studio and MSBuild
The SonarQube Scanner for MSBuild requires your project to be built with MSBuild 14.0.
MSBuild 14.0 ships both as part of Visual Studio 2015 and as part of the standalone Microsoft Build Tools 2015. While installing Visual Studio on the analysis machine is not mandatory, we recommend doing so in order to benefit from its additional features such as running VSTest or MSTest unit tests, or FxCop analysis.
Projects targeting older versions of the .NET Framework can be built using MSBuild 14.0 by setting the "
TargetFrameworkVersion" MSBuild property as documented by Microsoft:
If you do not want to switch your production build to MSBuild 14.0, you can set up a separate build dedicated to the SonarQube analysis.
- Analysis of DNX projects (i.e. project.json) is not currently not supported, refer to - SONARMSBRU-167Getting issue details... STATUS
Analysis of Web Site Solutions is not supported, however analysis of Web Application Solutions is supported.