build-parallelism

Optimize MSBuild parallelism for .NET solutions using /maxcpucount and /graph.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill build-parallelism-1k-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-parallelism
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/build-parallelism
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill build-parallelism-1k-off

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates slow or underutilized .NET/MSBuild CI builds caused by sequential scheduling, shallow parallelism, or suboptimal project graph construction.

Core Features & Use Cases

  • Tune MSBuild worker parallelism using /maxcpucount (-m) so multi-project solutions can compile concurrently across available CPU cores.
  • Improve build scheduling with graph mode (/graph) to construct the full dependency graph upfront for better topological scheduling.
  • Diagnose critical-path bottlenecks by replaying binlogs and reviewing performancesummary to identify which projects or targets block parallel execution.
  • Use cases: multi-project monorepos, CI pipelines that don’t scale with available cores, and situations where build time doesn’t improve despite using -m.

Quick Start

Ask an agent to analyze your build bottlenecks and then recommend the right combination of dotnet build -m and dotnet build /graph based on your dependency graph and binlog evidence.

Frequently Asked Questions about build-parallelism

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does dotnet build -m not speed up my multi-project solution?

MSBuild parallelism fails to improve build time when suboptimal project dependency graph topology creates a slow critical path. Validating `ProjectReference` usage and applying graph mode (`/graph`) constructs the full dependency graph upfront for better topological scheduling.

How do I diagnose MSBuild critical-path bottlenecks using binlog?

You diagnose MSBuild critical-path bottlenecks by replaying binlogs and reviewing `performancesummary` and target summaries. This identifies which specific projects or targets block parallel execution and cause CPU core underutilization during multi-project .NET builds.

What is the best way to configure MSBuild parallelism for CI pipelines?

The best way to configure MSBuild parallelism for CI pipelines is tuning `/maxcpucount` (`-m`) to compile concurrently across available CPU cores, combined with `/graph` mode to optimize topological scheduling based on your multi-project dependency graph.

Does MSBuild graph mode work with existing ProjectReference dependencies?

Yes, MSBuild graph mode (`/graph`) works with existing `ProjectReference` dependencies by constructing the full dependency graph upfront. This enables better topological scheduling for multi-project .NET solutions compared to standard sequential scheduling.

When should I not use MSBuild graph mode for build parallelism?

You should avoid MSBuild graph mode when your multi-project .NET solution lacks complex `ProjectReference` dependencies or when binlog `performancesummary` analysis shows CPU cores are already fully utilized without it, indicating sequential scheduling is not the bottleneck.