build-parallelism

Installation
SKILL.md

Diagnose a slow parallel build (start here)

Work this checklist in order — it targets the usual root cause (a serial dependency chain that no number of cores can parallelize):

  1. Confirm parallelism is even on. Rebuild with 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).
  2. Find the critical path. From the binlog, read per-project timings and the node timeline. If total build time ≈ the sum of the projects on one dependency chain, that chain — not CPU count — is the bottleneck.
  3. Name the chain explicitly, e.g. Core → Api → Web → Tests. A long serial chain stays serial no matter how large -m is, because each project waits on its predecessor.
  4. Look for unnecessary ProjectReference edges that lengthen the chain — a reference that only needs build order (not the output assembly), or one that could be a PackageReference, forces serialization it doesn't need.
  5. Recommend flattening: break false dependencies so independent projects build concurrently, and consider /graph for better scheduling.
Installs
1.0K
Repository
dotnet/skills
GitHub Stars
5.1K
First Seen
Mar 10, 2026
build-parallelism — dotnet/skills