Requirements
The software requirements to run SonarQube for Visual Studio in your IDE.
Each IDE extension of SonarQube for IDE has its own requirements to work properly with the most recent releases.
Overview
SonarQube for Visual Studio is available for Visual Studio version 2022. You can install and run SonarLint in Visual Studio 2019 and 2017, but those versions are no longer supported.
The only thing you need to install is the SonarQube for IDE VSIX available on the Visual Studio Marketplace. Please see the Installation for complete install instructions.
SonarQube for Visual Studio needs a Java Runtime (JRE) to operate. 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.
Your JRE should be version 17+
If no path is provided or your path is invalid, SonarQube for Visual Studio will use its own JRE.

In versions prior to v4.34, additional steps were required for some languages. See below for more details.
Supported IDEs
See the SonarSource website for information about the currently supported IDEs, and also for details about which languages are supported in which IDEs.
Unsupported IDEs
SonarQube for Visual Studio is not currently available for Visual Studio for Mac
. However, it is still possible to use the Sonar C# and VB.NET analyzers in that IDE with a little manual configuration.
Support for analyzing C# and VB.NET in other IDEs
Visual Studio for Mac
supports the running of Roslyn analyzers that are shipped as NuGet packages. This includes Sonar C# and VB.NET rules.
The NuGet package id for the Sonar C# rules is SonarAnalyzer.CSharp. The NuGet package id for the Sonar VB.NET rules is SonarAnalyzer.VisualBasic
See below for information on setting up analysis in specific IDEs.
Visual Studio for Mac
To configure a project to use the Sonar C# analyser, edit the project file to include the following XML:
<!-- Import and configure the SonarC# analyzer -->
<PropertyGroup>
<SonarAnalyzerVersion>8.2.0.14119</SonarAnalyzerVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="$(SonarAnalyzerVersion)" />
<Analyzer Include="$(NuGetPackageRoot)SonarAnalyzer.CSharp/$(SonarAnalyzerVersion)/analyzers/*.dll" Visible="false" />
</ItemGroup>
Use SonarAnalyzer.VisualBasic
instead of SonarAnalyzer.CSharp
to configure the Sonar VB.NET analyzer.
Note that instead of editing every project file, you can create a single Directory.Build.props file at the solution level or repo level that will apply to all projects in the solution/repo.
It is possible to add references to NuGet packages through the UI but that will not add the necessary Analyzer
entries in the project file; you must still add them manually by directly editing the project file. See this StackOverflow post for more information.
Language-specific requirements
Last updated
Was this helpful?