Muokkaa

Jaa


Install external analyzers

Visual Studio includes a built-in core set of .NET Compiler Platform (Roslyn) analyzers, which are always on. If you need more analyzers, you can install external analyzers either as a NuGet package, or as a Visual Studio extension (.vsix file).

Install NuGet analyzer packages

To install a NuGet analyzer package, follow these steps:

  1. Find the analyzer package you want to install on NuGet.

    For example, you might want to install StyleCop.Analyzers to search for style issues in your codebase.

  2. Install the package in Visual Studio, using either the NuGet Package Manager or the Package Manager Console.

    The analyzer assemblies are installed and appear in Solution Explorer under References > Analyzers.

Install VSIX analyzers

To install a Visual Studio Extension-based analyzer, follow these steps:

  1. In Visual Studio, select Extensions > Manage Extensions.

    The Manage Extensions dialog box opens.

    Note

    Alternatively, you can find and download the analyzer extension directly from Visual Studio Marketplace.

  2. Expand Online in the left pane, and then select Visual Studio Marketplace.

  3. In the search box, enter the name of the analyzer extension you want to install, and then select it.

  4. Select Download.

    The extension is downloaded.

  5. Select Close to close the dialog box, and then close all instances of Visual Studio to launch the VSIX Installer.

    The VSIX Installer dialog box opens.

    Screenshot that shows the VSIX Installer dialog box.

  6. Select Modify to start the installation.

  7. After a minute or two, the installation completes. Select Close.

  8. Reopen Visual Studio.

  9. To verify whether the extension is installed, select Extensions > Manage Extensions. In the Manage Extensions dialog box, select Installed in the left pane, and then search for the extension by name.