O'Reilly logo

.NET Development Using the Compiler API by Jason Bock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Jason Bock 2016

Jason Bock, .NET Development Using the Compiler API, 10.1007/978-1-4842-2111-2_2

2. Writing Diagnostics

Jason Bock

(1)Shakopee, Minnesota, USA

Chapter 1 provided a foundational tour of the Compiler API. In this chapter, you’ll use that knowledge to build diagnostics. You’ll learn how to quickly find issues in code and provide code fixes to a developer when appropriate. You’ll also learn how to write unit tests for diagnostics and code fixes as well as debug your diagnostic code.

The Need to Diagnose Compilation

One of the first rules that I learned as a software developer is to “fail fast.” The quicker you can find an issue in your code, the less damage it can do (especially if you find it on your machine, then no one can blame ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required