Skip to content

Roslyn

The open-source C# and Visual Basic compilers, plus APIs for analyzing and working with code.

Stars
20.8k
Forks
4.4k
Licence
MIT
Language
C#
Last update
4 days ago
Type
Library

What it is

Roslyn is the open-source implementation of the C# and Visual Basic compilers, the programs that turn source code into running software. It also exposes an API surface that lets other programs read, analyze, and work with code. Developers use it to build code analysis tools and to understand how the compilers see their code.

  • Build a custom code analyzer that flags patterns in C# projects using the Roslyn APIs
  • Explore the compiler architecture via the Roslyn Architecture Overview docs
  • Read the contributing guide and try building and testing the compiler locally

Great for

  • Developers building code analysis or refactoring tools for .NET
  • Contributors who want to work on the C# or Visual Basic compilers
  • Teams curious about how .NET compilers work internally

Not ideal for

  • People who only want to write C# or VB code and need no compiler internals (the README does not describe end-user use; the compiler is typically used through existing .NET tooling)
  • Anyone looking for a ready-made end-user application, since the README describes a compiler platform and APIs
Step-by-step guide: how to use RoslynInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    Clone the repository

    git clone https://github.com/dotnet/roslyn
  2. 2

    Run it

    • Read the Roslyn Architecture Overview at the linked docs site to understand the compiler API model
    • Review CONTRIBUTING.md and the docs/contributing guides for build and test instructions
    • Optionally add a pre-release Roslyn package from the listed NuGet feeds to a test project
  3. 3

    Get the most out of it

    • Use the Roslyn Architecture Overview docs as the entry point for the API model
    • Ask questions on GitHub Discussions before contributing code, as the README suggests
    • Follow the linked help-wanted labels for IDE and Compiler bugs or features
    • Check the CI status tables to see which build and test configurations are passing

Downloads

Strengths

  • Official open-source implementation of the C# and Visual Basic compilers
  • Shared review process for internal and external contributors, per the README
  • Documentation and a Discord and Discussions community are linked from the README

Trade-offs

  • The README is focused on contributors and build pipelines, so it says little about beginner usage
  • The latest release listed is v4.0.1 with no binaries attached, so you may need to build from source or use pre-release NuGet feeds
  • Working on the codebase requires understanding a large compiler project

How it compares

ProjectStarsTypeLevelUpdatedBest for
roslyn (this)20.8kLibraryadvanced4 days agoDevelopers building code analysis or refactoring tools for .NET
spectre.console11.7kLibrarybeginner11 days agoC# or .NET developers writing command-line tools
BenchmarkDotNet11.5kLibraryintermediate5 days ago.NET developers who want to compare two or more implementations of a method
Terminal.Gui11.3kLibraryintermediate7 days agoC# / .NET developers building terminal tools with forms, tables or menus
UniTask11.3kLibraryintermediate1 months agoUnity developers who already use coroutines and want async/await instead
MudBlazor10.7kLibraryintermediate4 days ago.NET developers building web apps with Blazor

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.