Skip to end of metadata
Go to start of metadata

The "SonarQube Setup Guide For .NET Users" has been created jointly with Microsoft to allow .NET users to quickly setup the SonarQube ecosystem and track technical debt with no prior knowledge.

You should install it on any machine that will launch SonarQube analysis (example: development machine and build agent).

In case of installing MSBuild SonarQube Runner on a development machine or build agent, you need to make sure that the .NET Framework v4.5.2+ and Java SE Runtime Environment v7+ are installed on that machine.

Java SE Runtime Environment installation is not required if Visual Studio 2015 with Android tooling/Cross platform tools are installed since JDK is being installed part of Visual Studio installation.

Extract MSBuild SonarQube Runner

    • Download the latest MSBuild SonarQube Runner from the SonarQube downloads.
    • Right-click on the downloaded .zip file and click on the Unblock button.

    • Unzip MSBuild.SonarQube.Runner-[version] on to a drive. Example: C:\SonarQube\bin

Configure MSBuild SonarQube Runner

    • Edit C:\SonarQube\bin\SonarQube.Analysis.xml by specifying the following parameters to run against the SonarQube Server we set up earlier.
    • If you are running SonarQube 5.1.x or less, uncomment and set the following properties:

      • sonar.jdbc.url
      • sonar.jdbc.username
      • sonar.jdbc.password

         

OPTIONAL : Update the %PATH% environment variable

    • Add the directory containing the MSBuild SonarQube Runner executable to the %PATH% if you intend to use it from the command line:

Settings File Permissions

  • Storing passwords in clear text in unsecured settings files is not recommended.
  • Restrict access to the C:\SonarQube\bin\SonarQube.Analysis.xml file by setting appropriate file permissions.

You are now ready to analyze a project with the MSBuild SonarQube Runner.

  • No labels