Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.
Brian Gatt edited this page Jan 11, 2021 · 4 revisions

Getting Started

Prerequisites

Visual Studio 2019 installed.

Installing

  • Double click SonarLink.vsix to launch the installer. The dialog window shown below will popup. Select the product(s) you want to install the extension to, and then click Install.

image

  • Once the installation completes successfully, close all running Visual Studio instances, for the changes to take effect.

image

Usage

  • Launch Visual Studio and select View > Team Explorer to open the Team Explorer window. If you don't see the Connect page shown below, select Manage Connections via the plug icon () on the window toolbar.

image

  • Under the SonarLink section, select Sign in.
  • In the dialog window that appears, specify the URL of the SonarQube server you wish to connect to, enter your credentials and select Sign in.

image

  • Once signed in, the SonarLink page will be visible, displaying a list projects currently available on the SonarQube server, as shown below.

image

  • Filter projects by using the Filter Projects search box.

image

  • To view any detected issues for a given project, right-click the project and select View Issues.
  • At this point, SonarLink may raise a warning regarding local file path resolution. The Set Local Path command can be used to address this.

image

  • A list of issues will be displayed in the Error List window as shown below. If the window is not visible, select View > Error List from the Visual Studio menu bar.
  • The Messages category needs to be enabled in order to display SonarQube issues.

image

  • To connect a given project locally, right-click the project and select Set Local Path and select a folder/directory which hosts the source code associated to the SonarQube project. The chosen folder should represent the same directory hierarchy used by sonar-scanner for the selected project.

image

  • If successfully connected, double-clicking an issue from the Error List window will open the file at the issue location.
Clone this wiki locally