How to do it...

  1. Open a C# project, say ClassLibrary, with the analyzer NuGet package System.Runtime.Analyzers.nupkg pre-release version 1.2.0-beta2 installed in it.
  2. 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 and System.Runtime.CSharp.Analyzers:
  1. Expand the System.Runtime.Analyzers node to view all the CAXXXX rules implemented in the assembly and click on a specific rule, say CA1813: Avoid unsealed attributes, to view the rule properties, such as ID, Message, Title, Description ...

Get Roslyn Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.