Automate Yourself Out Of a Job With Roslyn
summary
Covers using Roslyn compiler-as-a-service to read, analyze and rewrite C# code: loads solutions via MSBuildLocator and Workspaces, inspects SyntaxTrees with the Visual Studio Syntax Visualizer, gets SematicModels and symbols to distinguish System.String vs custom types, and runs visitors and a CSharpSyntaxRewriter that modifies string literals. Shows a real project, VisualRecode WCF→gRPC, a NuGet legacy-workspace-loader to open old csproj files, and demonstrates applying changes back to the solution successfully.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:04What is Roslyn
- 8:46Setting up workspace
- 10:33Syntax trees basics
- 14:08Navigating syntax trees
- 18:47Syntax query demo
- 20:13Syntax walker demo
- 23:43Semantic models explained
- 27:40Symbol demo
- 33:14Symbol visitor demo
- 39:59Finding all types
- 40:50Dependencies demo
- 43:00Rewriting code
- 47:19Analyzers and resources
- 48:43Q&A








