C# source-generator

Open-source C# projects categorized as source-generator

Top 23 C# source-generator Projects

source-generator
  1. Pure.DI

    Pure DI for .NET

  2. SaaSHub

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

    SaaSHub logo
  3. Nino

    The fastest binary serializer for C#. Source-generated, zero-allocation: services, RPC, messaging, caching, storage, Unity and Godot.

    Project mention: Show HN: Nino v4 – SIMD deserialization for .NET SortedList | news.ycombinator.com | 2026-11-10
  4. FastCloner

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

  5. Immediate.Handlers

    Source Generated implementation of the Mediator pattern

  6. 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.

  7. DotMake Command-Line

    A modern, strongly-typed command-line framework for .NET. Define your commands, options and arguments as C# classes and properties, and let source generation handle the plumbing — with no runtime reflection.

    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. 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.

  9. DependencyPropertyGenerator

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

    Project mention: [Showoff] Tired of DependencyProperty boilerplate? I built a Zero-Allocation Source Generator for WPF/MAUI with strict type safety. | dev.to | 2026-08-18

    This project is originally a fork of the excellent HavenDV's generator. While the original is fantastic, I needed something that could scale to massive enterprise solutions without choking Visual Studio or Rider.

  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. EasyEcs

    High-performance, allocation-free archetype ECS for C# and .NET 10: game servers, Godot 4 games, simulations and real-time backends. Source-generated [ForEach] jobs with auto-vectorized SIMD loops, safe parallelism, change tracking, indexes, saves, Native AOT. 100k entities across 9 systems: 1.72 ms, 0 B per tick.

    Project mention: How EasyEcs runs a 100k-entity server tick in 1.72 ms with 0 B allocated | dev.to | 2026-10-20

    Moving 100,000 positions is an easy way to benchmark an ECS. A real server tick also applies status effects, fires projectiles, handles deaths and respawns, and updates each player's area of interest. I built EasyEcs for that whole workload in C# and .NET 10.

  16. 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

  17. rask

    The .NET One Person Framework — build, run, and ship a whole product solo, in C#, on one server. C# components server-rendered or on WebAssembly, a WebAssembly app on its own ASP.NET host — no Node, no npm. SQLite-first data, auth, jobs, mail, cache, CQRS & one-command deploy.

    Project mention: The .NET One Person Framework | news.ycombinator.com | 2026-08-24
  18. generator-start

    template repository for a roslyn source generator

  19. Signalynx

    High-performance mediator, dispatcher, and lightweight in-process messaging abstraction for .NET.

    Project mention: Build a Clean ASP.NET Core API with Signalynx and CQRS | dev.to | 2026-07-31

    Signalynx on GitHub

  20. 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...

  21. Pragmatic.Design

    A .NET metaprogramming framework. Describe your domain; one source generator derives persistence, APIs, validation, authorization, and more. More intent. Less plumbing.

  22. Podimo.ConstEmbed

    Compile-time file embedding as string constants.

  23. Tortuga.Shipwright

    A trait engine for C#.

  24. 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.

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 848
2 Nino 653
3 FastCloner 375
4 Immediate.Handlers 206
5 Enum.Source.Generator 198
6 DotMake Command-Line 173
7 PropertyChanged.SourceGenerator 169
8 DependencyPropertyGenerator 154
9 NTypewriter 152
10 M31.FluentAPI 141
11 Postman2CSharp 55
12 HttpClientCodeGenerator 47
13 safe-routing 45
14 EasyEcs 41
15 NimbleMock 40
16 rask 33
17 generator-start 23
18 Signalynx 17
19 SKPromptGenerator 15
20 Pragmatic.Design 15
21 Podimo.ConstEmbed 14
22 Tortuga.Shipwright 14
23 PrimaryParameter 11

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com