build-perf-diagnostics

Diagnose MSBuild performance bottlenecks by analyzing binary log performance summaries.

Updated Sep 22, 2026
One-click install
npx skills add https://github.com/bytecakelake/Nurse-Scheduler --skill build-perf-diagnostics-bytecakelake
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: build-perf-diagnostics
Source: https://github.com/bytecakelake/Nurse-Scheduler/tree/main/.agents/plugins/dotnet-msbuild/skills/build-perf-diagnostics
Command: npx skills add https://github.com/bytecakelake/Nurse-Scheduler --skill build-perf-diagnostics-bytecakelake

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Slow .NET builds are hard to diagnose without visibility into where time is spent. This Skill analyzes MSBuild binary logs to pinpoint the exact targets, tasks, and configurations causing build slowdowns. ## Core Features & Use Cases - Binlog Performance Analysis: Replay binary logs with performance summaries to identify expensive targets and tasks sorted by cumulative time. - Bottleneck Detection: Detect seven common bottleneck categories including slow ResolveAssemblyReference, Roslyn analyzer overhead, serialization bottlenecks, excessive Copy tasks, evaluation overhead, redundant NuGet restore, and poor project graph shape. - Threshold-Based Diagnosis: Apply concrete thresholds such as RAR over 5 seconds, analyzers consuming over 30% of Csc time, single targets dominating over 50% of build time, and node utilization below 80%. - Use Case: A team's solution build takes 8 minutes. Use this Skill to replay the binlog, discover that analyzers consume 45% of compile time, and conditionally disable them in the dev inner loop while preserving CI enforcement. ## Quick Start Analyze my build.binlog file and tell me which targets and tasks are making my MSBuild build slow.

Frequently Asked Questions about build-perf-diagnostics

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

FAQPage Schema
How do I find out why my MSBuild build is slow?▼

Generate a binary log with dotnet build /bl -m, then replay it with dotnet msbuild build.binlog -flp:v=diag;performancesummary. The Target and Task Performance Summary sections at the end of the log list all targets and tasks sorted by cumulative time.

How to analyze a binlog file for build performance?▼

Replay the binlog to a diagnostic text log with the performancesummary flag, then grep for Target Performance Summary and Task Performance Summary sections. Check node utilization, analyzer execution time, and per-project build times to identify bottlenecks.

Why is ResolveAssemblyReference slow in my build?▼

RAR slowness typically comes from too many assembly references, network-based reference paths, or large search paths. RAR runs unconditionally even on incremental builds, and .NET Core micro-assemblies inflate reference counts. Reduce transitive references with DisableTransitiveProjectReferences.

How do I reduce Roslyn analyzer build time without losing CI checks?▼

Set RunAnalyzers conditionally using the ContinuousIntegrationBuild property so analyzers run only in CI. Use EnforceCodeStyleInBuild conditionally and adjust rule severity in .editorconfig rather than removing analyzers entirely.

When should I not use binlog performance diagnostics?▼

Do not use this approach for establishing initial baselines, fixing incremental build issues, or tuning parallelism, as dedicated skills cover those. It also does not apply to non-MSBuild build systems.