~/talk

Code that writes code - .NET Source generators

Talkat NDC Copenhagen 2025 · 2025-09-08..09-12· [developer-experience]
slides:none on file

Shows how .NET Source Generators use the Roslyn APIs and an IIncrementalGenerator pipeline to emit C# at compile time, eliminating reflection and boilerplate. Demonstrates generators for strongly typed IDs, service registration, options binding via an additional text provider, and compile‑time mapping that emits diagnostics on mismatches. Emission is deterministic, cached by Roslyn, and only regenerates changed pieces, so performance stays fast; debugging works via debugger attach or unit tests.

AI-written summary · about

  1. 0:00Introduction
  2. 1:07Source generation in .NET
  3. 3:14Incremental generators
  4. 7:33Strongly typed identifiers
  5. 19:00Pitfalls in source generators
  6. 20:04Debugging generators
  7. 21:52Service registrations
  8. 29:24Options bindings from schema
  9. 36:52Domain to DTO mapping
  10. 47:58Benefits and use cases
  11. 50:07Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.