Skip to end of metadata
Go to start of metadata

Ease the analysis configuration

Icon
It is recommended to use the Analysis Bootstrapper for Visual Studio Projects Plugin to automatically configure many of the required analysis parameters.

Description / Features

The plugin enables analysis of VB.NET (all versions since 2002) with SonarQube. It offers coding rules provided directly by the plugin, as well as integration with FxCop / Code Analysis (version 10 at least).

Note that multi-language .NET solutions (C# + VB.NET) can be analyzed with the SonarQube platform.

Another plugin is available to analyze Visual Basic 6 and earlier versions: http://www.sonarsource.com/products/plugins/languages/visual-basic-6/

Installation

  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. (warning) It's also strongly recommended to install Analysis Bootstrapper for Visual Studio Projects Plugin which configure automatically many of the required analysis parameters
  3. Restart the SonarQube server

Additional installation steps

FxCop / Code Analysis (version 10 at least) must be installed on the analysis machine in order to be able to enable its rules in the plugin.

Running an Analysis

The SonarQube Runner is recommended for analyzing .NET solutions.

To use SonarQube Runner, you must create a sonar-project.properties file in the folder containing the solution (*.sln) file.

Example project

README: https://github.com/SonarSource/sonar-examples/blob/master/projects/languages/csharp/README.md

Browse: https://github.com/SonarSource/sonar-examples/tree/master/projects/languages/csharp

Download: https://github.com/SonarSource/sonar-examples/archive/master.zip

Code Coverage

To display code coverage data:

  1. Prior to the SonarQube analysis, generate the NCover3OpenCover (at least version 4.5), dotCover (at least version 2.7) or Visual Studio (MSTest / VSTest) XML coverage reports.
  2. Import these reports while running the SonarQube analysis by setting the sonar.vbnet.ncover3.reportsPaths property to the path of the NCover3 reports (separated by commas if there are several reports). Set the sonar.vbnet.opencover.reportsPaths property for OpenCover reports, sonar.vbnet.dotcover.reportsPaths for dotCover HTML reports (JSON / XML not supported), and sonar.vbnet.vscoveragexml.reportsPaths for Visual Studio XML coverage reports. Paths may be absolute or relative to the solution directory. Wildcards '*', '?' and '**' are supported.

Unit Test Results

To display unit test results data, set the sonar.vbnet.vstest.reportsPaths property to the path of the *.trx Visual Studio Test Results reports (separated by commas if there are several reports). Wildcards '*', '?' and '**' are supported.

Extending Coding Rules

Additional .NET plugins

Metric Definitions

See Metric definitions page.

Upgrading from version 2.1?

Carefully read Upgrade from the .NET ecosystem version 2.1.

  • No labels