Coding For a Living


A place to share and comment about coding for a living.

What is the Microsoft .NET Compiler Platform? Mike McIntyre

The Microsoft .NET Compiler Platform, better known as Roslyn, consists of two compilers (one for C# and one for Visual Basic) with rich code analysis APIs.

Roslyn provides compilers as services which can be used to create code focused tools and applications. This creates opportunities for innovation in areas such as meta-programming, code generation and transformation, scripting, interactive use of the C# and VB languages, and embedding of C# and VB in domain specific languages.

Roslyn exposes the C# and Visual Basic compiler’s code analysis to you as a consumer by providing an API layer that mirrors a traditional compiler pipeline.


Each phase of this pipeline is now a separate component. First the parse phase, where source is tokenized and parsed into syntax that follows the language grammar. Second the declaration phase, where declarations from source and imported metadata are analyzed to form named symbols. Next the bind phase, where identifiers in the code are matched to symbols. Finally, the emit phase, where all the information built up by the compiler is emitted as an assembly.

In April 2014 Roslyn went open source.

Get started with Roslyn

Comments are closed.
Showing 0 Comment