build-perf-baseline

Establish MSBuild/.NET build performance baselines and apply optimization strategies.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you understand and improve the speed of your .NET builds by establishing clear performance baselines and guiding you through systematic optimization techniques.

Core Features & Use Cases

  • Baseline Measurement: Capture cold, warm, and no-op build times to identify performance regressions.
  • Optimization Strategies: Guides on using MSBuild Server, artifacts output, deterministic builds, and dependency graph trimming.
  • Use Case: Before starting a major refactor, use this Skill to establish your current build times. After the refactor, re-measure to quantify the performance impact and ensure no regressions were introduced.

Quick Start

Run the dotnet build command with the /bl flag to generate a binary log for performance analysis.

Frequently Asked Questions about build-perf-baseline

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

FAQPage Schema
How do I measure a .NET build performance baseline before optimizing MSBuild?

To establish a .NET build performance baseline, run the dotnet build command with the /bl flag to generate a binary log. This captures cold, warm, and no-op build times to identify potential performance regressions before applying optimization techniques.

What is the best way to diagnose slow dotnet build times in a .NET project?

The best way to diagnose slow dotnet build times is to capture baseline measurements across cold, warm, and no-op builds. Generating a binary log with the /bl flag allows you to analyze the MSBuild execution timeline and pinpoint specific targets or dependencies causing the delay.

How do I optimize MSBuild performance using static graph builds and artifacts output?

You can optimize MSBuild performance by applying systematic techniques like enabling static graph builds, configuring artifacts output, and trimming the dependency graph. These strategies reduce unnecessary project evaluations and parallelize build targets to improve overall .NET build speed.

Does the MSBuild Server feature help reduce dotnet build startup overhead?

Yes, MSBuild Server reduces dotnet build startup overhead by keeping the build process resident between invocations. This optimization technique avoids repeated process initialization and MSBuild node teardown, significantly improving warm build performance for iterative .NET development.

When should I establish a build performance baseline for a .NET project?

You should establish a build performance baseline before starting a major refactor or optimization effort. Re-measure the dotnet build times afterward to quantify the performance impact of changes like dependency graph trimming or static graph builds and ensure no regressions were introduced.

What are the limitations of using no-op build times for .NET build performance tracking?

No-op build times measure the overhead of the MSBuild evaluation phase when no actual compilation is needed. While useful for tracking baseline regressions in dependency graph traversal, they do not reflect the performance of actual code generation or static graph build execution.