C# Source Generators Articles, Tutorials & News
C# Source Generators articles, tutorials, and news from the DotNetNews archive.
88 articles Updated
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
The Dapper article is packed with copy-pasteable performance ideas for teams still writing a lot of SQL.
-
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
The Redis upgrade piece is a useful ASP.NET caching walkthrough.
C# source generators from the DotNetNews archive, curated for .NET developers who already ship production code. This is a reading list pulled from daily issues, not a substitute for the official docs on C# Source Generators.
Use Start here for the editorial shortlist, then browse Latest or the full archive when you need more depth. Coverage leans toward incremental source generators, Roslyn source generators, codegen C#. Recent pieces worth opening: “Your Architecture Has a Token Bill So I Made the Compiler Collect It” and “C# Barcode Library: Comparing 11 Options for .NET Developers in 2026”.
Latest
Newest Source Generators from the archive
-
Stop Leaking Generated Types in .NETmedium.com Issue #434
-
Source code generated string enums with exhaustion supportsteven-giesel.com Issue #429
- Rounding, routing, and agent workflows
DotNetNews Issue #410
-
.NET Source Generators with Jason Bockdotnetrocks.com Issue #391
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.