dotnet-build-optimization

Diagnose slow .NET builds by analyzing MSBuild binary logs.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-build-optimization-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-build-optimization
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/dotnet-build-optimization
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-build-optimization-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps diagnose and resolve slow build times or issues where builds are not incremental, saving developers significant time and frustration.

Core Features & Use Cases

  • Incremental Build Diagnosis: Identifies why targets run on every build.
  • Binary Log Analysis: Uses MSBuild Structured Log Viewer to pinpoint build bottlenecks.
  • Parallel Build Optimization: Configures MSBuild for faster builds using multiple cores.
  • Restore Optimization: Speeds up NuGet package restores.
  • Use Case: A developer's build suddenly takes 10 minutes instead of 1 minute. This Skill guides them through capturing a binary log, analyzing it to find the non-incremental target, and applying the correct fix.

Quick Start

Use the dotnet-build-optimization skill to diagnose why my build is slow by capturing a binary log.

Frequently Asked Questions about dotnet-build-optimization

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

FAQPage Schema
How do I diagnose why my .NET build is slow?

Diagnosing slow .NET builds involves capturing a binary log and analyzing it with MSBuild Structured Log Viewer to pinpoint bottlenecks and identify non-incremental targets. This Skill guides you through capturing and analyzing the log to find the exact cause of the delay.

Why does my MSBuild target run on every build instead of being incremental?

Incremental build failures happen when MSBuild targets run every time due to missing or misconfigured inputs and outputs metadata. This Skill diagnoses these failures by analyzing binary logs to identify the specific targets running unnecessarily.

Do I need .NET 8.0 SDK and SDK-style projects to optimize build performance?

Yes, full functionality requires the .NET 8.0+ SDK and SDK-style projects to optimize build performance effectively. These prerequisites enable the Skill to properly configure parallel builds and diagnose incremental issues across your .NET projects.

What is the best way to speed up NuGet package restores in my build?

Speeding up NuGet restores is achieved by optimizing restore configurations to reduce package download times during the build process. This Skill analyzes your restore phase using binary logs and applies optimizations to minimize time spent fetching dependencies.

Can I configure MSBuild for parallel builds across multiple cores?

Configuring MSBuild for parallel builds allows you to compile projects across multiple cores simultaneously to reduce overall build time. This Skill sets up parallel build configurations in your MSBuild environment to maximize CPU utilization during compilation.