tooling
C# Source Generators Articles, Tutorials & News
C# Source Generators articles, tutorials, and news from the DotNetNews archive.
88 articles Updated
C# Source Generators work shows up across many DotNetNews issues because teams keep hitting the same implementation questions. C# Source Generators is a recurring focus for C# and .NET developers working in the Microsoft ecosystem.
Recurring subtopics in recent issues include incremental source generators, Roslyn source generators, codegen C#, and source. When a subtopic never appears in the archive titles or excerpts, it is left out of this introduction.
Expect publisher tutorials, release notes, architecture write-ups, and field notes linked from DotNetNews issues. Start here is a short editorial shortlist for C# Source Generators; the archive list is chronological and larger. Secondary angles such as C# source generators and incremental source generators appear when the archive actually covered them. Cross-links to Roslyn and C# Code Analysis and C# help when the problem spans more than one tag.
Each card points at the original publisher URL and the DotNetNews issue that carried it, so you can read the article in context or jump straight to the source.
Start here
Editor picks for Source Generators
-
C# Source Generators: Improving Performance and Reducing Boilerplate Code
c-sharpcorner.com Issue #472
Source generators eliminate boilerplate at compile time; slower builds, faster runtime.
-
.NET Source Generators with Jason Bock
dotnetrocks.com Issue #391
Source generators remain one of the best ways to trade boilerplate for compile-time help.
-
Exploring the (underwhelming) System.Diagnostics.Metrics source generators: System.Diagnostics.Metrics APIs - Part 2
andrewlock.net Issue #388
I appreciated the source-generator deep dive because it questions whether the abstraction actually earns its keep.
-
Stop Writing Boilerplate: How C# Source Generators Are Saving MVVM
medium.com Issue #371
Source generators keep paying dividends, and this MVVM-focused post shows how much boilerplate they can erase.
-
How I Used C# Source Generators to Eliminate Boilerplate and Speed Up Development
blog.stackademic.com Issue #341
Source generators can erase repetitive code, and this write-up shows where compile-time automation actually pays off.
-
Why We Left AutoMapper for .NET Source Generators
levelup.gitconnected.com Issue #316
Two production failures, 480 DTOs, and one compiler feature that changed everything Continue reading on Level Up Coding ».
-
On .NET Live - On .NET Live - Source Generators in Jinget
youtube.com Issue #215
Source generators on .NET Live should be worth watching if you care about compile-time tooling.
-
C# in the Age of AI: Build Smart, Self-Writing Code with Source Generators
medium.com Issue #212
https://medium.com/@mohsho10/c-in-the-age-of-ai-build-smart-self-writing-code-with-source-generators-8e686c84889c.
Archive
Page 1 of 4
Newest first
-
Your Architecture Has a Token Bill So I Made the Compiler Collect It
medium.com Issue #497
How I turned “our codebase is agent-friendly” from a hope into a build error, with Roslyn analyzers, a token budget, and a little Norse…
-
C# Barcode Library: Comparing 11 Options for .NET Developers in 2026
c-sharpcorner.com Issue #473
Explore the top 11 C# barcode libraries for .NET developers in 2026. Compare open-source & commercial SDKs for generating, reading, and scanning barcodes in diverse applications. Find the best fit for...
-
C# Source Generators: Improving Performance and Reducing Boilerplate Code
c-sharpcorner.com Issue #472
Learn C# Source Generators with practical examples. Discover how compile-time code generation improves performance and reduces boilerplate code in .NET applications.
-
Source Generator-Based CQRS Library in C#: A Review of the Mevora Library
medium.com Issue #440
Hello, fellow .NET developers! Today, I’d like to talk to you about a new library — Mevora — that promises to be quite exciting, and how…
-
Stop Leaking Generated Types in .NET
medium.com Issue #434
If you’ve ever opened generated C# code and thought, “Why are there so many tiny helper types floating around my assembly?”, this post is…
-
Source code generated string enums with exhaustion support
steven-giesel.com Issue #429
Some time ago (over 4.5 years ago!) I wrote a blog post titled: "A better enumeration - Type safe from start to end". While cool and so - it had some issues. Let's tackle them!
-
Splitting the NetEscapades.EnumGenerators packages: the road to a stable release
andrewlock.net Issue #414
In this post I describe the recent architectural changes to the NetEscapades.EnumGenerators package, which is now a metapackage, to support more scenarios
-
Part 2: Build an MCP Server in C#/.NET and Enrich It With Repository Context
medium.com Issue #411
The .NET ecosystem now has an official C# MCP SDK plus project templates that get you from “zero” to a working server fast.
-
Rounding, routing, and agent workflows
DotNetNews Issue #410
A varied .NET roundup on rounding, ASP.NET Core routing, Azure-backed email queues, background jobs, security, and AI-assisted coding tools.
-
.NET Source Generators with Jason Bock
dotnetrocks.com Issue #391
Why would you write code to generate code? Carl and Richard talk with Jason Bock about his experiences using modern .NET source generators to optimize certain aspects of applications. Jason talks abou...
-
C# Rounding, Routing, and Azure Workflows
DotNetNews Issue #390
A mixed .NET roundup covering rounding rules, ASP.NET Core routing, Azure queue email pipelines, background jobs, and AI dev tools.
-
Exploring the (underwhelming) System.Diagnostics.Metrics source generators: System.Diagnostics.Metrics APIs - Part 2
andrewlock.net Issue #388
In this post I explore the source generators shipped in Microsoft.Extensions.Telemetry.Abstractions, explore the code, and discuss whether I would use them
-
I Got Tired of DI Wiring in .NET (So I Built AttributedDI)
medium.com Issue #385
Seven years ago (wow, time flies), I was working on a big greenfield .NET project. It started clean and optimistic, and then, like many…
-
Stop Writing Boilerplate: How C# Source Generators Are Saving MVVM
medium.com Issue #371
The “Manual Era” of C# is over. If you are still writing backing fields and PropertyChanged strings, you are paying a tax you no longer…
-
Partial Constructors in C# 14 (.NET 10) - A Game-Changing Feature
c-sharpcorner.com Issue #359
C# 14 introduces Partial Constructors, a game-changer for .NET 10! Split constructor logic across files, enhance source generator support, and improve maintainability. Build modular, scalable applicat...
-
Resolving Overload Ambiguity with Collection Expressions
meziantou.net Issue #351
OverloadResolutionPriority allows you to specify which method overload should be preferred by the compiler when multiple overloads are applicable. This can be useful in scenarios where you have multip...
-
ASP.NET Core pipeline, C# 14, and .NET 10 networking
DotNetNews Issue #349
A varied .NET roundup covering filters, middleware, dependency injection, testing, logging, LINQ performance, and new platform features.
-
AI workflows, C# 14, EF Core
DotNetNews Issue #345
A varied .NET roundup with AI agents, C# 14 features, EF Core and Dapper, Visual Studio 2026, profiling, and code quality advice.
-
EF Core, C# features, and ASP.NET Core security
DotNetNews Issue #343
Practical .NET reads on EF Core configuration, C# language habits, ASP.NET Core pipelines, caching, security, and clean architecture.
-
(RoomSharp) Source-Generated Data Layer for Modern .NET
medium.com Issue #342
If you’ve ever envied Android’s Room stack and wished you could have the same attribute-driven ergonomics, source-generated DAOs, and… Continue reading on JavaScript in Plain English »
-
Automatically Registering Services in .NET DI with Scrutor
medium.com Issue #342
.NET contains a very basic DI (Dependency Injection) container sufficient to meet the application’s own needs. This built-in container is…
-
How I Used C# Source Generators to Eliminate Boilerplate and Speed Up Development
blog.stackademic.com Issue #341
An exploration of compile-time metaprogramming, what it automates well, and the surprising productivity gains it unlocked. Continue reading on Stackademic »
-
Blazor vs Razor Pages in .NET 10
DotNetNews Issue #340
This issue covers Blazor, EF Core query tuning, validation patterns, distributed events, browser agents, and the latest Visual Studio update.
-
Top .NET 10, Aspire, and C# 14
DotNetNews Issue #336
A varied .NET roundup covering .NET 10, Aspire, MCP for AI, C# language updates, EF Core performance, and API architecture patterns.
-
ASP.NET evolution, AI in VS, and .NET 10 preview
DotNetNews Issue #325
A mixed issue covering ASP.NET history, .NET 10 reflection tricks, Blazor forms, Azure CI/CD, SQL Server JSON, performance, and Visual Studio AI.