On this page
Installation
For the most part, SonarLint can be installed directly from your IDE's Marketplace. Offline installations are also possible and previous versions are always available if needed.
Instructions
SonarLint is available as an extension for Visual Studio versions 2019 and 2022. SonarLint for Visual Studio is available for Visual Studio 2017, but it is no longer supported.
To install SonarLint from within Visual Studio:
- From Visual Studio, go to Extensions > Manage Extensions and search SonarLint for Visual Studio.
- Select SonarLint for Visual Studio and click Download.
The extension will be installed after all instances of Visual Studio have been closed.
First taste of SonarLint
Now that you have SonarLint installed, open or create a new project containing source files in a programming language SonarLint can analyze out of the box. See the Rules page for 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 SonarLint returns in the Error List:
// TODO: Say hello to SonarLint!

© 2015-2023, SonarSource S.A, Switzerland. Except where otherwise noted, content in this space is licensed under the GNU Lesser General Public License, Version 3.0. SONARLINT is a trademark of SonarSource SA. All other trademarks and copyrights are the property of their respective owners. See SonarSource.com for everything you need to know about the Sonar Solution.