Skip to main content

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

733
GitHub Stars
56
Curated Resources
8
Categories
3 hours ago
Last Refreshed
BooksTutorialsOpen Source ProjectsOpen Source Analyzers, Code Fixes, and RefactoringsLibraries and Frameworks for Testing Analyzers, Code Fixes, and RefactoringsSource GeneratorsBlog Posts and ArticlesTalks

Use this list with your AI agent

Add the Context Awesome MCP server to Claude, Cursor, or any MCP client, then ask:

"Show me open source projects resources from awesome-roslyn"

Installation instructions →

What's inside

Open Source Projects

  • Bridge

    C# to JavaScript transpiler. Write modern mobile and web apps in C# and run them anywhere in JavaScript.

  • CodeAnalysis.CSharp.PatternMatching

    Intuitive pattern matching for Roslyn syntax trees. Simplifies C# syntax and semantic analysis.

  • Code Converter

    C# to VB.NET and VB.NET to C# transpiler.

  • CodeGeneration.Roslyn

    Roslyn-based Code Generation during a build with design-time support.

  • dotnet-script

    Runs C# scripts from the .NET CLI, defines NuGet packages inline and edit/debugs them in VS Code.

  • FlubuCore

    Cross platform build automation tool for building projects and executing deployment scripts using C# code.

Tutorials

Open Source Analyzers, Code Fixes, and Refactorings

  • Code Cracker

    Analyzer library for C# and VB.NET. Offers diagnostics in many categories like performance, coding styles, as well as some basic refactorings.

  • CSharpGuidelinesAnalyzer

    Reports diagnostics for C# coding guidelines (

  • ErrorProne.NET

    Set of analyzers and code fixes focusing on the correctness and performance of C# programs. Inspired with Google's

  • Mapping Generator

    Code fix that generates arbitrary complex object-object mappings. It recognizes out of the box a large number of scenarios where mappings are used. A design-time alternative to

  • .NET Analyzers

    GitHub organization for the development of Roslyn analyzers. Various repositories within the organization cover analyzers for ASP.NET Core, WPF, IDisposable, usages of System.Reflection, etc.

  • .NET Compiler Platform ("Roslyn") Analyzers

    Diagnostic analyzers developed by the Roslyn team. Initially developed to help flesh out the design and implementation of the static analysis APIs. The analyzers cover code quality, .NET Core, desktop .NET Framework, comments in code, and more.

Source Generators

  • DpDtInject

    Proof-of-concept of a dependency injection container that transfers huge piece of resolving logic to the compilation stage. Offers additional compile-time safety and fast runtime resolution.

  • Generator.Equals

    Automatically implements equality and hashing for classes and records. Supports different comparison strategies. Offers similar functionality like IL weaving-based

  • JsonSrcGen

    Reflection-free JSON serializer. Allows extremely fast JSON processing by generating reflection-free serializers at the compile time.

  • Source Generator Playground

    Online application that lets you experiment with source generators. Perfect for learning and testing your ideas. Write your own source generator or learn from built-in examples and see the generated output.

  • StrongInject

    Compile-time dependency injection container. Compile-time checked, reflection-free and runtime code generation free, thus fast and

  • StructPacker

    Low-level, lightweight and performance-focused serializer for C# struct types. Auto-generates C# serialization code to achieve peak runtime performance and efficiency.

Blog Posts and Articles

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

  • Microsoft.CodeAnalysis.Testing

    Library for testing analyzers and code fixes with NUnit, xUnit and MSTest frameworks. A part of

  • RoslynTestKit

    Lightweight framework for writing unit tests for analyzers, code fixes, refactorings, and completion providers. It's unit testing framework agnostic.

Books

  • .NET Development Using the Compiler API

    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.

  • Roslyn Cookbook

    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.

  • Roslyn Succinctly

Talks

  • The Power of Roslyn

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

Showing a sample of 56 resources. View the full list on GitHub →