From dotnet-msbuild
Guide for optimizing MSBuild build parallelism and multi-project scheduling. Only activate in MSBuild/.NET build context. USE FOR: builds not utilizing all CPU cores, speeding up multi-project solutions, evaluating graph build mode (/graph), build time not improving with -m flag, understanding project dependency topology. Note: /maxcpucount default is 1 (sequential) — always use -m for parallel builds. Covers /maxcpucount, graph build for better scheduling and isolation, BuildInParallel on MSBuild task, reducing unnecessary ProjectReferences, solution filters (.slnf) for building subsets. DO NOT USE FOR: single-project builds, incremental build issues (use incremental-build), compilation slowness within a project (use build-perf-diagnostics), non-MSBuild build systems. INVOKES: binlog MCP server tools (expensive_projects, expensive_targets, project_target_times); falls back to dotnet build -m, dotnet build /graph, binlog replay + grep.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dotnet-msbuild:build-parallelismThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `/maxcpucount` (or `-m`): number of worker nodes (processes)
/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 pipelinesnpx claudepluginhub weiflycc-cmd/skills --plugin dotnet-msbuildProvides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.