Understanding Workspaces

A workspace is a representation of a solution, as a collection of projects, where each project has a collection of documents. A document typically represents a source code file. A solution is an immutable model of projects and documents and is represented by the Microsoft.CodeAnalysis.Solution object; projects and documents are represented by the Microsoft.CodeAnalysis.Project and Microsoft.CodeAnalysis.Document objects, respectively. You can select the workspace to analyze and then get the semantic model and syntax trees via methods like GetSemanticModelAsync and GetSyntaxTreeAsync.

Now that you have gotten an overview of the main points of interest in the .NET Compiler Platform, it is time to start building analyzers ...

Get Visual Basic 2015 Unleashed 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.