C# source-generator

Open-source C# projects categorized as source-generator

Top 22 C# source-generator Projects

source-generator
  1. Pure.DI

    Pure DI for .NET

  2. ReSharper

    ReSharper is now available in VS Code and Cursor. ReSharper brings a professional toolset for C# developers backed by over 20 years of experience, enterprise-grade security, SOC 2 compliance, and the trust of companies worldwide.

    ReSharper logo
  3. FastCloner

    The fastest deep cloning library for .NET – zero-config, works out of the box.

  4. Enum.Source.Generator

    A C# source generator to create an enumeration class from an enum type. With this package, you can work on enums very, very fast without using reflection.

  5. Immediate.Handlers

    Source Generated implementation of the Mediator pattern

  6. PropertyChanged.SourceGenerator

    Powerful INotifyPropertyChanged / INotifyPropertyChanging Source Generator, which generates INPC boilerplate for you as part of your build. Supports features such as automatic and manual dependencies between properties, notifications when specific properties change, and more.

  7. DotMake Command-Line

    Declarative syntax for System.CommandLine via attributes for easy, fast, strongly-typed (no reflection) usage. Includes a source generator which automagically converts your classes to CLI commands and properties to CLI options or CLI arguments.

    Project mention: Docfx-Plus: A template and a tool to enhance DocFx and migrate from SHFB (Sandcastle) | dev.to | 2025-12-13

    Live Demo - Sample API docs result for our other project DotMake Command-Line.

  8. DependencyPropertyGenerator

    Dependency property, routed event and weak event source generator for WPF/UWP/WinUI/Uno/Avalonia/MAUI platforms.

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. NTypewriter

    File/code generator using Scriban text templates populated with C# code metadata from Roslyn API.

  11. M31.FluentAPI

    Generate fluent builders for your C# classes with ease.

  12. Postman2CSharp

    Postman2CSharp hosts the source code for https://postman2csharp.com, a website for converting Postman collections to C# ApiClients that can be seamlessly exported and imported into your project. Generated ApiClient projects contains no dependencies and highly customizable.

  13. HttpClientCodeGenerator

    HttpClientGenerator is a tool that uses the Roslyn code generator feature to write boilerplate HttpClient code for you.

  14. safe-routing

    A C# source generator for ASP.NET Core razor pages and MVC controllers which produces strongly-typed identifiers for routes.

  15. NimbleMock

    Zero-allocation, source-generated .NET mocking library. 34x faster than Moq with partial mocks, static mocking, fluent API, and async support.

    Project mention: NimbleMock: A Modern, Blazing-Fast Mocking Library for .NET (34x Faster Than Moq) | dev.to | 2025-12-13

    GitHub: https://github.com/guinhx/NimbleMock

  16. generator-start

    template repository for a roslyn source generator

  17. SKPromptGenerator

    Generates strongly typed classes for Semantic Kernel using prompt strings.

    Project mention: If Dspy is so great, why isn't anyone using it? | news.ycombinator.com | 2026-03-23

    Agent Framework + middleware + source generation is the way to go.

    Agent Framework made middleware much easier to work with.

    Source generation makes it possible to build "strongly typed prompts"[0]

    Middleware makes it possible to substitute those at runtime if necessary.

    [0] https://github.com/CharlieDigital/SKPromptGenerator/tree/mai...

  18. Tortuga.Shipwright

    A trait engine for C#.

  19. Podimo.ConstEmbed

    Compile-time file embedding as string constants.

  20. PrimaryParameter

    Using a Field or Property attribute on parameters. Automaticaly generate private readonly fields or private properties. Forbid the use of primary constructor's parameters.

  21. OneOf.TypeExtensions

    An incremental source generator that creates typed extension methods for OneOf<> types for more readable and robust code.

  22. moonbuggy

    .NET i18n library — PO + ICU MessageFormat with zero-allocation source-generated translations

    Project mention: Moonbuggy, a .NET alloc-free internationalization library | news.ycombinator.com | 2026-02-09
  23. Xtz.StronglyTyped

    Set of NuGet packages to strongly-type your interfaces (properties, methods, APIs, DB entities, appsettings). Eliminate stringly-typed interfaces. Make compiler your friend, introduce semantics to your code.

  24. MsSql.Adapter

    Dotnet incremental source generator of service contracts for MSSQL stored procedures

  25. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C# source-generator discussion

Log in or Post with

C# source-generator related posts

  • Is it just me, or is WPF just harder to work with than WinForms?

    2 projects | /r/csharp | 9 Jun 2022
  • Traits for C#

    3 projects | /r/csharp | 18 Mar 2022
  • Alternative to Fody.PropertyChanged?

    5 projects | /r/csharp | 18 Jan 2022

Index

What are some of the best open-source source-generator projects in C#? This list will help you:

# Project Stars
1 Pure.DI 804
2 FastCloner 357
3 Enum.Source.Generator 197
4 Immediate.Handlers 191
5 PropertyChanged.SourceGenerator 166
6 DotMake Command-Line 164
7 DependencyPropertyGenerator 153
8 NTypewriter 150
9 M31.FluentAPI 137
10 Postman2CSharp 55
11 HttpClientCodeGenerator 47
12 safe-routing 45
13 NimbleMock 40
14 generator-start 23
15 SKPromptGenerator 15
16 Tortuga.Shipwright 14
17 Podimo.ConstEmbed 14
18 PrimaryParameter 11
19 OneOf.TypeExtensions 10
20 moonbuggy 9
21 Xtz.StronglyTyped 5
22 MsSql.Adapter 1

Sponsored
ReSharper is now available in VS Code and Cursor
ReSharper brings a professional toolset for C# developers backed by over 20 years of experience, enterprise-grade security, SOC 2 compliance, and the trust of companies worldwide.
www.jetbrains.com

Did you know that C# is
the 11th most popular programming language
based on number of references?