build-perf-diagnostics

Diagnose MSBuild performance bottlenecks by analyzing binlog files.

5.1k|377|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/dotnet/skills --skill build-perf-diagnostics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-perf-diagnostics
Source: https://github.com/dotnet/skills/tree/main/plugins/dotnet-msbuild/skills/build-perf-diagnostics
Command: npx skills add https://github.com/dotnet/skills --skill build-perf-diagnostics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify and resolve performance bottlenecks in your .NET MSBuild builds, reducing build times and improving developer productivity.

Core Features & Use Cases

  • Binlog Analysis: Analyzes MSBuild binlogs to pinpoint slow targets, tasks, and analyzers.
  • Bottleneck Identification: Detects common issues like slow ResolveAssemblyReference, analyzer overhead, and serialization bottlenecks.
  • Use Case: When your dotnet build command takes an unusually long time, use this Skill to analyze the generated binlog and get actionable insights on what's causing the delay.

Quick Start

Analyze the build performance of the attached 'build.binlog' file to identify slow targets and tasks.

Frequently Asked Questions about build-perf-diagnostics

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

FAQPage Schema
How do I diagnose slow .NET MSBuild build times?

To diagnose slow .NET MSBuild build times, you analyze a generated binlog file to pinpoint bottlenecks. This process identifies expensive targets, tasks, and Roslyn analyzer overhead through timeline analysis and critical path identification.

What causes bottlenecks in MSBuild binlog files?

MSBuild binlog files reveal bottlenecks such as slow ResolveAssemblyReference tasks, Roslyn analyzer overhead, and serialization bottlenecks. Analyzing the binlog timeline and node utilization identifies these specific expensive targets and tasks causing delays.

How do I analyze a dotnet build binlog to find expensive targets?

You analyze a dotnet build binlog to find expensive targets by replaying it to text logs for data-driven analysis. This reconstructs the build timeline to evaluate node utilization and isolate the critical path tasks consuming the most time.

Can I measure Roslyn analyzer impact on MSBuild performance using a binlog?

Yes, you can measure Roslyn analyzer impact on MSBuild performance using a binlog. The analysis detects analyzer overhead by evaluating task execution times within the build timeline to determine if specific analyzers are causing significant delays.

What is the best way to identify the critical path in a slow .NET build?

The best way to identify the critical path in a slow .NET build is through binlog timeline analysis. By replaying the binlog to text logs, you can trace task dependencies and node utilization to isolate the sequential tasks extending build duration.

Do I need to generate a binlog before diagnosing MSBuild performance issues?

Yes, you need to generate a binlog before diagnosing MSBuild performance issues. The Skill requires an attached build.binlog file as input to perform timeline analysis and detect slow targets, tasks, and analyzer overhead.