Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Diagnose and fix under-parallelized MSBuild builds. USE WHEN a multi-project solution build is slower than expected, doesn't speed up when you add cores, pegs a single core while others idle, or you want to know why `-m` isn't helping. Note: `/maxcpucount` default is 1 (sequential) — always pass `-m` for parallel builds. Covers finding the critical path (longest serial ProjectReference chain), graph build (`/graph`), BuildInParallel, and solution filters (`.slnf`). DO NOT USE FOR: single-project
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -5% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -27% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 50% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -9% | 0% |
Work this checklist in order — it targets the usual root cause (a serial dependency chain that no number of cores can parallelize):
dotnet build -m /bl:{}(PowerShell: dotnet build -m -bl:{{}}). -m with no number uses all logical processors; without -m MSBuild runs a single node (sequential).
node timeline. If total build time ≈ the sum of the projects on one dependency chain, that chain — not CPU count — is the bottleneck.
Core → Api → Web → Tests. A long serialchain stays serial no matter how large -m is, because each project waits on its predecessor.
ProjectReference edges that lengthen the chain — areference that only needs build order (not the output assembly), or one that could be a PackageReference, forces serialization it doesn't need.
build concurrently, and consider /graph for better scheduling.
/maxcpucount (or -m): number of worker nodes (processes)-m for parallel builds-m without a number = use all logical processorsperformancesummary and check Project Performance Summary — shows per-project time; grep for node.*assigned to check scheduling/graph)dotnet build /graph or msbuild /graph<ProjectReference> (no programmatic MSBuild task references)<ProjectReference> — each adds to the dependency chain<ProjectReference ... SkipGetTargetFrameworkProperties="true"> to avoid extra evaluations<ProjectReference ... ReferenceOutputAssembly="false"> for build-order-only dependenciessolution filters (.slnf) to build subsets of the solution<MSBuild Projects="@(ProjectsToBuild)" BuildInParallel="true" /> in custom targetsBuildInParallel="true", MSBuild task batches projects sequentially/maxcpucount > 1 for this to have effectIMultiThreadableTask can run on multiple threads[MSBuildMultiThreadableTask]Use the binlog MCP server (Microsoft.AITools.BinlogMcp, exposed under the binlog MCP namespace):
Step-by-step:
dotnet msbuild build.binlog -noconlog -fl -flp:v=diag;logfile=full.log;performancesummaryfull.loggrep 'Target Performance Summary' -A 30 full.log → find the bottleneck targets-m in CI (many CI runners have multiple cores)dotnet build /graph works well with structured CI pipelinesOther measured skills in the registry, with their headline benchmark lift.