Errata

It is very hard to keep a book error free and as there are a couple of technologies in the book that were in CTP state when the book was written; things can change. This page is here to provide you with corrections to those errors found after publishing.

Chapter 10

This book was written when Roslyn was in CTP2 (second CTP) and the latest CTP (third CTP) has some changes that can cause confusion. The following sub-sections will have information about the breaking changes and what listings it affects.

Listing 10.2 -- No longer possible to run Scripts through ScriptEngine directly

In order to run the script, you need to change the listing to the following:

Listing 10.3

Same issue as mentioned above.

Listing 10.6 -- ParseCompilationUnit is removed

ParseCompilationUnit on SyntaxTree is removed and you should instead use ParseText.

Once you have the SyntaxTree you no longer need to cast the returned value from GetRoot() to a CompilationUnitSyntax.

Listing 10.9 -- Changes in the auto generated GetIssue method

When creating a Code Issue project, the generated file is changed a bit. Instead of GetText() on the token, you now use ToString() and instead of CodeIssue.Severity.Warning you use CodeIssueKind.Warning

Listing 10.12 -- AnalyzeStatementDataFlow() is renamed

The method AnalyzeStatementDataFlow has been renamed to AnalyzeDataFlow

Listing 10.14 -- CodeIssue.Severity.Warning has been moved

CodeIssue.Severity.Warning has been moved

Listing 10.15

Same as above. The complete implementation of the Code Issue needs to be updated