Install third-party analyzers
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
Visual Studio includes a core set of .NET Compiler Platform (Roslyn) analyzers. These analyzers are always on. You can install additional analyzers either as NuGet packages, or as Visual Studio extensions in VSIX files.
To install NuGet analyzer packages
Find the analyzer package you want to install on www.nuget.org.
For example, you may want to install StyleCop.Analyzers to look for style issues in your codebase.
Install the package in Visual Studio, using either the Package Manager Console or the Package Manager UI.
Note
The www.nuget.org page for each analyzer package shows you the command to paste into the Package Manager Console. There's even a handy button to copy the text to the clipboard.
The analyzer assemblies are installed and appear in Solution Explorer under References > Analyzers.
To install VSIX analyzers
In Visual Studio, select Tools > Extensions and Updates.
The Extensions and Updates dialog box opens.
Note
Alternatively, you can find and download the analyzer extension directly from Visual Studio Marketplace.
Expand Online in the left pane, and then select Visual Studio Marketplace.
In the search box, type the name of the analyzer extension you want to install.
Select Download.
The extension is downloaded.
Select OK to close the dialog box, and then close all instances of Visual Studio to launch the VSIX Installer.
The VSIX Installer dialog box opens.
Select Modify to start the installation.
After a minute or two, the installation completes. Select Close.
Open Visual Studio again.
If you want to check whether the extension is installed, select Tools > Extensions and Updates. In the Extensions and Updates dialog box, select the Installed category on the left, and then search for the extension by name.