dotnet-build-optimization

Diagnose .NET build performance issues using MSBuild binary logs and caching strategies.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-build-optimization-rudironsoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-build-optimization
Source: https://github.com/rudironsoni/dotnet-agent-harness/tree/main/.rulesync/skills/dotnet-build-optimization
Command: npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-build-optimization-rudironsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

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

Core Features & Use Cases

  • Incremental Build Diagnosis: Identifies why targets run unnecessarily on every build.
  • Binary Log Analysis: Guides users on capturing and interpreting MSBuild binary logs for deep insights.
  • Parallel Build Tuning: Explains how to configure and leverage parallel builds for faster compilation.
  • Caching Strategies: Covers NuGet restore optimization and build caching to reduce redundant work.
  • Use Case: A developer's build time has doubled. They use this Skill to capture a binary log, identify a misconfigured custom target that's causing non-incrementality, and fix it by adding proper Inputs/Outputs.

Quick Start

Use the dotnet-build-optimization skill to diagnose why a target is running on every build 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
Why does my .NET build run targets unnecessarily on every build?

Non-incremental .NET builds often occur due to misconfigured custom targets lacking proper Inputs/Outputs, or timestamp corruption. Diagnosing MSBuild binary logs helps identify targets running unnecessarily and restore incremental build behavior.

How do I capture and analyze MSBuild binary logs to diagnose slow build times?

Capture MSBuild binary logs to gain deep insights into build performance. Analyzing these logs reveals misconfigured targets and slow restore operations, enabling you to optimize .NET build performance effectively.

What is the best way to configure parallel builds in MSBuild to speed up compilation?

Configuring parallel builds in MSBuild allows faster compilation by executing multiple build tasks concurrently. Tuning parallel build configurations reduces overall .NET build times by leveraging available CPU resources efficiently.

How can I optimize NuGet restore operations to reduce slow .NET build times?

Optimize NuGet restore operations by implementing build caching strategies to reduce redundant work. Addressing slow restore operations in SDK-style projects minimizes delays and significantly improves overall .NET build performance.

Does this build optimization approach work with SDK-style projects using MSBuild 17.8+?

Yes, the build optimization approach specifically targets SDK-style projects using MSBuild 17.8 and above. It effectively addresses incremental build failures, timestamp corruption, and caching strategies within this environment.