In this recipe, we will show you how to use the Solution explorer in Visual Studio 2017 to view the different analyzers installed in a project, view the implemented analyzer rules in these assemblies, as well as the rule properties (or the descriptor metadata), and configure the rule severity and persist the new severity settings.
You will need to have created and opened a .NET project in Visual Studio 2017 with NuGet-based analyzers installed in the project. Refer to the first recipe in this chapter for installing analyzers in a .NET project.
- Open a C# project, say
ClassLibrary
, with the analyzer NuGet packageSystem.Runtime.Analyzers.nupkg
pre-release version 1.2.0-beta2 installed in it. - In the solution explorer, expand
References
|Analyzers
nodes to view the analyzer assemblies installed through the analyzer NuGet package(s). We should see two analyzer assemblies,System.Runtime.Analyzers...