Getting Started Writing a Custom Analyzer & Code Fix

Kasey Uhlenhuth edited this page Nov 18, 2016 · 4 revisions
Clone this wiki locally

Before Visual Studio 2015, it was difficult to create custom warnings that target C# or Visual Basic. However, since we shipped and open sourced the Diagnostics API in the .NET Compiler Platform ("Roslyn"), this once difficult task has become easy! Using our APIs, all you need to do is perform a bit of analysis to identify your issue and (optionally) provide a tree transformation as a code fix. Once you provide that information, we automatically do the heavy-lifting of running your analysis on a background thread, showing squiggly underlines in the editor, populating the Visual Studio Error List, creating "light bulb" suggestions and showing rich previews.



Documentation & Tools