Finding and installing analyzers
There are quite a few code analyzers on GitHub. A quick search returns 28 possible C# code analyzers out of 72 repository results. A few of these seem to be student projects. Check those out too; there is some very clever code in some of them. As for this recipe, we will be working with CodeCracker for C# to demonstrate how to install an analyzer from a NuGet package.

Getting ready
All that you will be doing is downloading a NuGet package for your project. Other than that, there is nothing you specifically need to do in order to get ready.
How to do it...
- Start off by creating a new console application. You can call it whatever you like. In my example, I simply called it
DiagAnalyzerDemo
.

- From the
Tools
menu, selectNuGet Package Manager
and thenManage NuGet Packages for Solution...
.
- In the
Browse
tab, search forCode-Cracker
. The results should return thecodecracker.CSharp
NuGet package. Check the project you want to apply the NuGet package to and click on...