Installation
The steps you need to install SonarQube for Visual Studio in your IDE.
For the most part, SonarQube for IDE can be installed directly from your IDE’s Marketplace. Offline installations are also possible and previous versions are available if needed.
SonarQube for Visual Studio is available as an extension for Visual Studio version 2022.
Instructions
To install SonarQube for Visual Studio from within Visual Studio:
From Visual Studio, go to Extensions > Manage Extensions and search SonarQube for Visual Studio.
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
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 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:
// TODO: Say hello to SonarQube for Visual Studio!

Last updated
Was this helpful?