In this recipe, we will show you how to search and install analyzer NuGet packages in the NuGet package manager in Visual Studio, and see the analyzer diagnostics from an installed NuGet package shown in project build and as live diagnostics during code editing in Visual Studio.
You will need to have Visual Studio 2017 installed on your machine for this recipe. You can install a free community version of Visual Studio 2017 from https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15.
- Create a C# class library project, say
ClassLibrary
, in Visual Studio 2017. - In solution explorer, right-click on the solution or project node and execute the
Manage NuGet Packages
command:
- This brings up the
NuGet Package Manager
, which can be used to search and install NuGet packages to the solution or project:
- In the search bar, type the following text to find NuGet packages tagged...