Getting started
Installation
Install the analyzer package into the project that contains your Visual Studio extension:
<PackageReference Include="Microsoft.VisualStudio.SDK.Analyzers" Version="17.*" PrivateAssets="all" />
The package adds analyzers to the build. PrivateAssets="all" keeps the development-time tooling
from becoming a runtime dependency of your extension.
Using the analyzers
Build your extension normally. Diagnostics appear in the compiler output and Visual Studio Error List. Some rules include a code fix that can update the source automatically.
Review the complete analyzer list for each rule's rationale, examples, and limitations.