Top 22 C# source-generator Projects
-
-
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.
-
-
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.
-
-
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.
-
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-13Live Demo - Sample API docs result for our other project DotMake Command-Line.
-
DependencyPropertyGenerator
Dependency property, routed event and weak event source generator for WPF/UWP/WinUI/Uno/Avalonia/MAUI platforms.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
NTypewriter
File/code generator using Scriban text templates populated with C# code metadata from Roslyn API.
-
-
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.
-
HttpClientCodeGenerator
HttpClientGenerator is a tool that uses the Roslyn code generator feature to write boilerplate HttpClient code for you.
-
safe-routing
A C# source generator for ASP.NET Core razor pages and MVC controllers which produces strongly-typed identifiers for routes.
-
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-13GitHub: https://github.com/guinhx/NimbleMock
-
-
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...
-
-
-
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.
-
OneOf.TypeExtensions
An incremental source generator that creates typed extension methods for OneOf<> types for more readable and robust code.
-
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 -
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.
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
C# source-generator discussion
C# source-generator related posts
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 |