How to do it...

  1. Let's download the SDK and extend the compiler, installing the VS extension, .NET Compiler Platform SDK, by going through the Tools | Extensions and Updates menu, searching for Roslyn SDK:
  1. We can now download the .NET Compiler Platform SDK templates as a .vsix file, which gives us all the available project templates to create an analyzer:
  1. We can now use the template projects in New Project | Visual C# | Extensibility | Stand-Alone Code Analysis Tool.
  1. Let's open a new console application for an Extensibility project:

Get ASP.NET Core MVC 2.0 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.