~/talk

Code that writes code - .NET Source generators

Talkat NDC London 2026 · 2026-01-26..01-30· [developer-experience]
slides:none on file

Source generators hook into the Roslyn pipeline (must target .NET Standard 2.0) to produce ephemeral .g.cs files at compile time, removing reflection and runtime cost and giving full IntelliSense. Examples build working features: incremental generators that avoid IDE lag, generated strongly typed ID structs with implicit conversions, a combined service-registration extension from attributes, options binding driven by an external schema via the additional files provider, and compile‑time mapping diagnostics. Code is tested with Roslyn-based unit tests and snapshot verification and emitted via register source output.

AI-written summary · about

  1. 0:00Introduction to .NET source generators
  2. 3:06Why use source generators
  3. 7:30Source generators and compiler
  4. 10:20Generating strongly typed IDs
  5. 22:18Automating service registration
  6. 29:31Compiling config options
  7. 36:21Generating object mappers
  8. 45:43Testing and debugging generators
  9. 50:41Key takeaways and resources
~/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.