How it works...

The analyzers node in solution explorer gives a visual representation of the analyzer items defined in the project file, which correspond to analyzer assemblies added manually to the project or added via analyzer NuGet package(s). The rules in the assembly come from each type in the assembly that implements the DiagnosticAnalyzer type and has a DiagnosticAnalyzerAttribute applied to it. The rule properties shown in the properties window come from instantiating the analyzer types and requesting them for it's SupportedDiagnostics.

Changing the rule severity in solution explorer and then persisting it for the project happens through an automatically generated ruleset file, which gets added to the project. Refer to the next recipe to get more details on ruleset-based analyzer configuration.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset