~/talk

Automate Yourself Out of a Job with Roslyn

Talkat NDC Oslo 2021 · 2021-11-29..12-03· [developer-experience]
slides:none on file

Roslyn is Microsoft's compiler-as-a-service and the talk shows how to use Roslyn Workspaces plus Microsoft.Build.Locator to load solutions, then read SyntaxTrees, get semantic models and symbols, and traverse with a SyntaxWalker or transform code with a Syntax Rewriter (immutability creates new Solution instances and TryApplyChanges can fail like a merge conflict). Examples include generating protobuf from WCF to create a gRPC proxy that works, a string-literal upshifter, and an analyzer with Diagnostic analyzer + CodeFix that wraps DiagnosticSource.Write with IsEnabled, plus unit tests using the CodeFixVerifier.

AI-written summary · about

  1. 0:00Introduction to Roslyn
  2. 1:14What is Roslyn?
  3. 5:05Getting started with Roslyn
  4. 6:31Understanding Workspaces
  5. 8:27Locating MSBuild and projects
  6. 11:51Syntax Trees and Visualizer
  7. 14:22Navigating Syntax with LINQ
  8. 17:56Using Syntax Walkers
  9. 20:29Semantic Models and Symbols
  10. 22:30Exploring Symbols
  11. 25:26Using Symbol Visitors
  12. 27:07Analyzing Project Types
  13. 30:44Rewriting Code
  14. 32:57Syntax Rewriters
  15. 37:46Practical Code Generation
  16. 39:33Roslyn Analyzers
  17. 44:00Creating an Analyzer
  18. 46:52Testing the Analyzer
  19. 50:04Code Fix Providers
  20. 55:26Testing and Conclusion
~/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.