377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
The Roslyn compiler pipeline and authoring source generators, incremental generators, analysers and code fixes.
Roslyn's phases, immutable syntax trees, Compilation and SemanticModel, IOperation, emit, the compiler server and using the APIs to build tools.
Source generator authoring: IIncrementalGenerator, project setup (netstandard2.0, analyser references), post-initialisation output, debugging, packaging and pitfalls.
Incremental pipelines, caching and equality, ForAttributeWithMetadataName, avoiding symbols and syntax in models, and measuring generator performance.
Authoring DiagnosticAnalyzer: descriptors, registration actions, concurrency, generated code, testing with the Roslyn testing packages, severity configuration and packaging.
CodeFixProvider authoring: FixableDiagnosticIds, RegisterCodeFixesAsync, CodeAction with equivalence keys, syntax editing with trivia, Fix All and testing.
Comparing source generators, MSBuild-generated files (gRPC, OpenAPI), T4, IL weaving and interceptors for build-time code generation, with trade-offs.