Oct 09 - 11 | 2023 Utrecht Netherlands
09:00 - 17:00

Under the Hood of C#'s "Roslyn" compiler

This workshop is the day-long hands-on version of the "Adding a New Language Feature to C# in 60 Minutes" talk.

Attendees will start off by forking the Roslyn compiler project on GitHub, clone the repository locally, build the compiler, and then use Visual Studio to implement a new language feature right in the compiler source code.

During this journey, you'll learn about the different phases of the compiler, including lexing and parsing to produce a syntax tree, binding to produce a bound tree, reporting diagnostics to the user, lowering code to a simpler form in order to finally emit executable code.

To accomplish all of these tasks, we'll take an iterative approach by compiling the compiler project in Visual Studio, run it under the debugger, add new functionality for each consecutive phase of compilation, rinse and repeat.

At the end of the workshop, you'll have a custom build of the C# compiler supporting a new simple language feature. More importantly, you'll have gained some familiarity with the Roslyn source code, you'll be able to follow the compiler development on GitHub by perusing pull requests, and maybe you'll even want to impress your friends and colleagues by contributing a pull request to Roslyn.



  1. Installation of Visual Studio 2022 with .NET workload enabled.
    1. Visual Studio 2022 IDE - Programming Tool for Software Developers (microsoft.com)
  2. Installation of Git.
    1. Git - Downloads (git-scm.com)
  3. GitHub account.
    1. GitHub
  4. Fork Roslyn repo.
    1. Fork dotnet/roslyn (github.com)
  5. Git clone and build forked repo.
    1. mkdir %USERPROFILE%\source\repos
    2. cd %USERPROFILE%\source\repos
    3. git clone https://github.com/xyz/roslyn.git (replace <xyz> with your GitHub user name)
    4. cd roslyn
    5. restore.cmd
    6. build.cmd
  1. Install .NET 7 RC1 SDK
    1. Download .NET 7.0 (Linux, macOS, and Windows) (microsoft.com)
  2. Install ILSpy
    1. ILSpy - Microsoft Store Apps
Bart De Smet

Originally from Belgium, Bart relocated to work at the Microsoft headquarters in 2007 after graduating from Ghent University while being a C# MVP.

After having worked on WPF and .NET for a few years, Bart focused on reactive programming for quite some time, helping to build Reactive Extensions (Rx) and large scale event processing systems powering various cloud services.

After a brief stint in AutoML focusing on Python performance tuning, Bart is now focusing on building next generation distributed systems in the office of the CTO.

decorative image