Executive Summary
In this session, Drew Noakes, Jake, and Emmanuel reveal the architectural reinvention of C# Dev Kit 11 for Visual Studio Code. Rather than an incremental update, C# Dev Kit 11 represents a complete ground-up rewrite engineered to meet the demands of modern development environments where humans and multiple autonomous AI agents work concurrently on large solutions.
The team exposes how uncoordinated build operations previously consumed immense machine resources, causing developer machines with even 256 GB of RAM to lock up. To solve this, the team introduced two foundational innovations pushed deep into Roslyn and the .NET SDK: the Language Service Cache (.lscache) and the BuildX Incremental Build Engine. Together with the new MSBuild Coordinator, these technologies yield a 77% reduction in workspace load times, an 80% reduction in memory footprint, a 97% reduction in no-op build overhead, and instant cross-worktree developer experiences.
Core Breakthroughs & Architecture Highlights:
- The Multi-Agent Concurrency Crisis: Developer environments have shifted from single-user scenarios to setups running 5 to 15 concurrent AI coding agents. Without coordination, each agent spawns dedicated MSBuild worker processes, oversaturating CPU cores and consuming hundreds of gigabytes of RAM.
- Language Service Cache (
.lscache): Decouples project metadata extraction from expensive runtime MSBuild evaluation. The pre-compile input data (resolved source files, globs, package references, target frameworks) is serialized to disk in milliseconds. Instead of taking hundreds to thousands of milliseconds per project, tools read project state in 1–2 milliseconds. - Open-Source Roslyn & SDK Integration: The
.lscacheinfrastructure was contributed directly to the open-source Roslyn repository and baked into the .NET SDK, ensuring that every build tool across the ecosystem can emit and consume the cache. - Workspace Load Benchmarks: Workspace startup time dropped by ~77% across large-scale open-source solutions (Orleans, Roslyn, ILSpy). Memory allocated by the C# Dev Kit server dropped by 80% (allowing 5 full IDE/agent instances in the footprint of 1 legacy instance).
- BuildX (Incremental Build Engine): Bypasses MSBuild invocation overhead for incremental builds. Analyzes project dependency graphs, evaluates up-to-date states in milliseconds, and directly copies compiled binaries to dependent project outputs.
- Aspire Build Acceleration: On the massive 400+ project .NET Aspire solution, building after a single file edit dropped from 36.1 seconds to 2.1 seconds. No-op build overhead plummeted by 97% (from 34.4s down to 0.9s).
- MSBuild Coordinator: A centralized resource manager and priority queue (co-authored with Dustin Campbell) that caps global build concurrency and prioritizes active human focus (foreground IDE window) over background agents.
- Git Worktree Sharing: Multiple Git worktrees seamlessly share
.lscachefiles, compiled binaries, PDBs, and NuGet packages, slashing the fixed initialization cost of spinning up disposable agent worktrees. - Agent Intent Optimization: Vision for detouring agent-issued
dotnet buildanddotnet testcommands into intent-based shortcuts (e.g. querying Roslyn LSP for compiler diagnostics without compiling, running only impacted tests via Git diff analysis).
Detailed Section-by-Section Breakdown
1. The Multi-Agent Machine Freeze: Genesis of the Redesign
Presenter: Jake
Jake describes an internal escalation from a partner engineering team working on high-end machines (256 GB RAM). The team reported that VS Code and C# Dev Kit were constantly freezing. Diagnostic dumps revealed the root cause: the engineers had shifted to multi-agent workflows, running 5 to 15 autonomous agents concurrently to solve GitHub issues.

Each agent was independently triggering builds, test runs, and project evaluations. This unleashed hundreds of concurrent MSBuild worker processes that devoured all 256 GB of memory and locked the operating system. Jake tested an initial prototype build queue that serialized builds; counter-intuitively, overall agent throughput increased because CPU cache contention and memory thrashing were eliminated.
2. Anatomy of a Build & The "Design-Time" Tax
Presenter: Drew Noakes
Drew explains that developers and tools perform far more builds than they realize. Conceptually, builds consist of three distinct phases:
- Pre-Compile: Evaluates project files, expands globbing patterns, resolves multi-targeted package references, and determines compiler arguments.
- Compile: Invokes Roslyn (
csc.exe) to emit assemblies. - Post-Compile: Copies output artifacts and satellite assemblies.

Development tools (VS Code, Visual Studio, dotnet watch, dotnet test, dotnet format) do not need the emitted binaries for language services—they only need the Pre-Compile inputs. Historically, tools repeatedly ran heavy "design-time builds" via MSBuild to extract this metadata, incurring hundreds of milliseconds of overhead per project.
3. Language Service Cache (.lscache)
To eliminate redundant project evaluations, C# Dev Kit 11 captures pre-compile data during standard builds and serializes it to a compact, compressed .lscache file on disk:
- Write Cost: Practically zero overhead because the data is already computed during the build.
- Read Cost: ~1–2 milliseconds per project, compared to 500–2,000+ milliseconds for an MSBuild design-time evaluation.
- Universal Availability: Written directly into Roslyn and the .NET SDK so all CLI and IDE tools can consume it.

4. Workspace Load & Memory Benchmarks
The real-world impact of the .lscache architecture on solution initialization is transformative:
- Load Time: Slashed by 77% across Orleans, Roslyn, and ILSpy solutions. Smaller everyday solutions load almost instantaneously.
- Memory Consumption: Server memory consumption dropped by 80%. The Roslyn codebase footprint in memory went from ~2 GB down to ~300 MB.


This 5x density improvement means a single developer machine can now run a human IDE session plus 4 background agent sessions within the exact same memory footprint previously occupied by one IDE.
5. BuildX: Fast Incremental Builds via Binary Acceleration
Drew introduces BuildX, an advanced incremental build engine integrated into C# Dev Kit and planned for CLI toolchains:
- In a multi-project reference graph (e.g. project $H$ at the base with dependent projects $A$ through $G$), changing code in $H$ requires recompiling $H$ and updating references.
- Rather than orchestrating the full MSBuild execution pipeline for every dependent project, BuildX determines project freshness in milliseconds.
- For dependent projects whose interface did not change, BuildX accelerates the build by directly copying the new output binaries from $H$ to dependent output directories without invoking MSBuild.

6. Aspire Solution Benchmarks: 36.1s to 2.1s
Testing BuildX on the massive .NET Aspire solution (over 400 projects) demonstrated extreme performance gains:
- Single File Change Build: Slashed from 36.1 seconds down to 2.1 seconds (>94% reduction).
- No-Op Build (Zero Changes): Slashed from 34.4 seconds down to 0.9 seconds (97% reduction in overhead).

7. Live Demo: GitHub Copilot App into VS Code
Presenter: Emmanuel
Emmanuel demonstrates an end-to-end development workflow:
- GitHub Copilot executes an autonomous task in
.NET eShop, creates an automated test, builds, and fails the test as expected. - The developer transitions from the Copilot App directly into VS Code.
- Because the Copilot action already built the project, C# Dev Kit 11 reads the
.lscacheimmediately: IntelliSense, semantic colorization, and gutter test runners light up in milliseconds. - Emmanuel edits the discount logic and re-runs the test; BuildX compiles and verifies the fix instantly.

8. MSBuild Coordinator: Prioritizing the Human
Presenter: Emmanuel & Jake
To address multiple agents running concurrent builds across different terminal windows and worktrees, the team (in collaboration with Dustin Campbell) built the MSBuild Coordinator:
- Central Concurrency Throttle: Intercepts build requests across the OS and queues them against available hardware cores.
- Human-First Priority Queue: Infers user focus (e.g. active VS Code window) to prioritize the developer's interactive build while background agent builds pause.
- De-duplication: Suppresses design-time builds if an agent is already performing a real build for that project.

9. Command-Line BuildX & Orchard Core Demo
Emmanuel runs BuildX directly from the command line against Orchard Core:
- A no-op build completes instantly in 0.0 seconds.
- Switching to a branch modifying a core abstraction triggers BuildX: only the modified abstraction and its immediate consumer recompile. Hundreds of downstream dependent projects are accelerated via binary copying in fractions of a second.

10. What Comes Next: Agent-First Optimizations & Git Worktrees
The presenters conclude with an architectural look at future capabilities:
- Detouring Agent Tool Calls: When an AI agent executes
dotnet buildjust to check for compile errors, the toolchain can intercept the command and query the in-memory Roslyn LSP diagnostics server directly, returning errors in milliseconds without invoking the compiler. - Intent-Based Test Execution: When an agent runs
dotnet test, the system infers modified code and executes only impacted tests rather than full test suites. - Cross-Worktree Resource Sharing: Extending
.lscache, compiled binaries, PDBs, and NuGet caches across Git worktrees, making spinning up dozens of disposable agent worktrees virtually cost-free.