User Experience on mobile might not be great yet, but I'm working on it.

Your first time on this page? Allow me to give some explanations.

Awesome Roslyn

Curated list of awesome Roslyn books, tutorials, open-source projects, analyzers, code fixes, refactorings, and source generators

Here you can see meta information about this topic like the time we last updated this page, the original creator of the awesome list and a link to the original GitHub repository.

Last Update: Oct. 27, 2021, 3:02 p.m.

Thank you ironcev & contributors
View Topic on GitHub:
ironcev/awesome-roslyn

Search for resources by name or description.
Simply type in what you are looking for and the results will be filtered on the fly.

Further filter the resources on this page by type (repository/other resource), number of stars on GitHub and time of last commit in months.

Books

Free e-book* by Alessandro Del Sole and the perfect book to start with. Explains Roslyn APIs and afterward focuses on writing analyzers and refactorings.

Book by Jason Bock. Besides analyzers and refactorings, it also explains the scripting API and provides an interesting reflection on the future of the Compiler API.

Book by Manish Vasani, a member of the Roslyn analyzers team. After covering analyzers, refactorings, and scripting in detail, the book goes in-depth explaining how to develop new C# language features and contribute to the Roslyn source code.

Tutorials

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

14.02K
3.23K
8m
MIT

A list of C# Source Generators (not necessarily awesome)

14
2
1y 12d
CC0-1.0

Series of blog posts that explore the Roslyn compiler API. It introduces the power of Roslyn through small self-contained examples. A perfect tutorial to start with :-)

Older but still not outdated, very detailed MSDN article on writing code analyzers.

The sequel to the previous MSDN article. A detailed introduction into code fixes.

Open Source Projects

C# to JavaScript compiler. Write modern mobile and web apps in C#. Run anywhere with Bridge.NET.

2.2K
294
1y 11m
Apache-2.0

Convert code from C# to VB.NET and vice versa using Roslyn

354
107
1y 57d
MIT

Pattern matching for Roslyn syntax trees

18
2
3y 7m
LGPL-3.0

Assists in performing Roslyn-based code generation during a build.

400
60
10m
MS-PL

Run C# scripts from the .NET CLI.

1.62K
99
8m
MIT

A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.

682
93
9m
MIT

MirrorSharp is a code editor <textarea> built on Roslyn and CodeMirror

100
16
9m
n/a

Compiles C# code by first rewriting the syntax trees of LINQ expressions using plain procedural code, minimizing allocations and dynamic dispatch.

676
25
1y 8m
n/a

Roslyn tool that for a given C# program shows syntax tree API calls to construct its syntax tree

536
86
9m
Apache-2.0

Tools to let you use Roslyn-powered C# scripts for code generation

619
71
1y 5m
MIT

Testura.Code is a wrapper around the Roslyn API and used for generation, saving and compiling C# code. It provides methods and helpers to generate classes, methods, statements and expressions.

188
19
1y 109d
MIT

A Roslyn based C# source generation framework

98
6
11m
Apache-2.0

Family of Open Source projects, each with one goal: To enable a great .NET experience in YOUR editor of choice.

Cross-platform C# editor. Features code completion, method signature help, quick fixes, and diagnostics.

Turns C# into a powerful scripting tool. Features C# REPL, installation of NuGet packages, and execution of scripts with a single line of code.

Visual Studio extension that intelligently introduces new C# language features into your existing code base.

Run C# code using different branches and versions of Roslyn.

Open Source Analyzers, Code Fixes, and Refactorings

902
268
1y 54d
Apache-2.0

An analyzer library for C# and VB that uses Roslyn to produce refactorings, code analysis, and other niceties.

1.05K
282
1y 11m
Apache-2.0

Reports diagnostics for C# coding guidelines that are not already covered by Resharper.

77
19
9m
Apache-2.0

Set of roslyn-based analyzers for catching common C# errors (inspired by Google's error-prone)

531
30
8m
MIT

"AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.

658
62
1y 45d
MIT

A Roslyn analyzer to improve the experience when working with nullable reference types.

3
1
7m
MIT

Refactoring Essentials for Visual Studio

632
121
2y 17d
MIT

Roslyn based C# heap allocation diagnostic analyzer that can detect explicit and many implicit allocations like boxing, display classes a.k.a closures, implicit delegate creations, etc.

490
48
1y 11d
Apache-2.0

A collection of 500+ analyzers, refactorings and fixes for C#, powered by Roslyn.

1.98K
168
8m
n/a

Code analyzer for C# and VB.NET projects https://redirect.sonarsource.com/plugins/vbnet.html

460
169
8m
n/a

An implementation of StyleCop rules using the .NET Compiler Platform

1.79K
385
8m
MIT

A collection of static analyzers based on Roslyn that integrate with VS

65
15
1y 60d
GPL-2.0

Libraries and Frameworks for Testing Analyzers, Code Fixes, and Refactorings

Roslyn-SDK templates and Syntax Vizualizer

174
70
1y 54d
MIT

A lightweight framework for writing unit tests for Roslyn diagnostic analyzers, code fixes, refactorings and completion providers.

10
1
1y 9m
n/a

Source Generators

Dpdt Injector repository.

1
1
1y 11d
n/a

A source code generator for automatically implementing IEquatable<T> using only attributes.

6
1
11m
n/a

Json library that uses .NET 5 Source Generators

29
2
1y 11d
MIT

compile time dependency injection for .Net

47
2
1y 12d
MIT

Low-level, lightweight and performance-focused serializer for C# struct types that uses Source Generators technology.

3
1
1y 33d
MIT

Svg to C# Source Generators

8
2
1y 29d
MIT

A .NET source generator for creating simple value objects wrapping primitive types.

2
1
1y 54d
MIT

Blog Posts and Articles

Inspiring introduction on how Roslyn team implemented immutable, reusable trees with cheap parent references and many other goodies. Quote: "But on the Roslyn team we routinely do impossible things" :-)

Excellent explanation why ReSharper will not use Roslyn. Includes good discussion on static code analysis and some limits of Roslyn.

Insight on how Roslyn team approaches the topic of evaluating and achieving performance.

Talks

Great talk by Kasey Uhlenhuth at NDC Oslo 2018 covering Roslyn essentials and APIs and tools for building code analyzers and fixes.