# Installation

SonarQube for Visual Studio is available as an extension for Visual Studio version [2022](https://marketplace.visualstudio.com/items?itemName=SonarSource.SonarLintforVisualStudio2022) and can be installed directly from your IDE’s Marketplace..

{% hint style="info" %}
Since March 1, 2022, SonarLint for Visual Studio 2017 has not been supported. After SonarLint for Visual Studio 8.0, no new features will be added to SonarLint for Visual Studio 2019. This means that *there will not be any new updates to these versions*.

Critical bugs will be addressed in SonarLint for Visual Studio 2019 for a period of 6 months after April, 2024. We encourage users to take advantage of the latest enhancements by updating to [SonarQube for Visual Studio 2022](https://marketplace.visualstudio.com/items?itemName=SonarSource.SonarLintforVisualStudio2022).
{% endhint %}

## Instructions <a href="#instructions" id="instructions"></a>

To install SonarQube for Visual Studio from within Visual Studio:

1. From Visual Studio, go to **Extensions** > **Manage Extensions** and search **SonarQube for Visual Studio**.
2. Select **SonarQube for Visual Studio** and click **Download**.

The extension will be installed after all instances of Visual Studio have been closed.

SonarQube for Visual Studio needs a Java Runtime (JRE) to operate and will use its own JRE if you don’t provide one.

* To specify a JRE, go to **Extensions** > **SonarQube** > **Options…** > **SonarQube** > **General** > **Java Home**, add the path to your JRE, and restart your IDE to apply the setting.

## First taste of SonarQube for Visual Studio <a href="#first-taste-of-sonarlint" id="first-taste-of-sonarlint"></a>

Now that you have SonarQube for Visual Studio installed, open or create a new project containing source files in a programming language SonarQube for Visual Studio can analyze out of the box. See the [Rules and languages](/sonarqube-for-visual-studio/using/rules.md) page for a table languages that work with your IDE.

For example in C#, you can copy-paste this code snippet into your file and have a look at what SonarQube for Visual Studio returns in the **Error List**:

```csharp
// TODO: Say hello to SonarQube for Visual Studio!
```

<div align="left"><figure><img src="/files/BoLNq3lm7KGxcu5vP0PF" alt="Your first taste of SonarQube for Visual Studio will be highlighted with squiggles and an issue description in the Error List view window."><figcaption></figcaption></figure></div>

## Connect to your server <a href="#updating-sonarlint-in-vs-code" id="updating-sonarlint-in-vs-code"></a>

Connect SonarQube for VS Code to your instance of [SonarQube Server](/sonarqube-server/2026.1/user-guide/connected-mode.md), [SonarQube Cloud](/sonarqube-cloud/analyzing-source-code/connected-mode.md), or [SonarQube Community Build](/sonarqube-community-build/user-guide/connected-mode.md) to expand your analysis capabilities and share quality profiles with your team. See the article about connected mode [Connected mode](/sonarqube-for-visual-studio/connect-your-ide/connected-mode.md#benefits), and the [Connected mode setup](/sonarqube-for-visual-studio/connect-your-ide/setup.md) page for full instructions to get going.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-for-visual-studio/getting-started/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
