incremental-build

Diagnose and fix MSBuild incremental build failures using binary log analysis.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill incremental-build-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: incremental-build
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/incremental-build
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill incremental-build-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Subsequent .NET builds rebuild everything even when nothing changed, wasting developer time. This Skill diagnoses why MSBuild targets re-execute unnecessarily and guides fixes for broken no-op builds. ## Core Features & Use Cases - Root-Cause Diagnosis: Identifies the 8 most common causes of broken incremental builds, including missing Inputs/Outputs on custom targets, volatile properties in output paths, and unregistered FileWrites. - Binlog-Based Analysis: Uses the binlog MCP server (or falls back to text-log replay with diagnostic verbosity) to find "Building target completely" vs "Skipping target" messages and pinpoint the exact input file triggering rebuilds. - Visual Studio FUTDC Guidance: Explains the Fast Up-to-Date Check, how it differs from MSBuild's incremental mechanism, and how to diagnose or disable it. - Use Case: A developer notices dotnet build recompiles the entire solution on every run. The Skill walks them through capturing two binlogs, searching for "is newer than output" messages, and fixing the offending custom target with proper Inputs/Outputs and FileWrites registration. ## Quick Start Ask the AI to diagnose why my .NET build rebuilds everything on the second run even though no source files changed.

Frequently Asked Questions about incremental-build

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

FAQPage Schema
Why does my .NET build rebuild everything when nothing changed?

The most common cause is custom targets missing Inputs and Outputs attributes, which forces them to run every build. Other causes include volatile properties like timestamps in output paths, file writes outside tracked Outputs, and glob changes from added or removed source files.

How do I diagnose why an MSBuild target re-executes?

Build twice with binary logs using dotnet build /bl, then analyze the second binlog. Search for "Building target completely" versus "Skipping target" messages, and grep for "is newer than output" to find the exact input file triggering the rebuild.

How do I make a custom MSBuild target incremental?

Add both Inputs and Outputs attributes listing stable file paths, typically using $(IntermediateOutputPath) for generated files. Register generated files in the FileWrites item group so dotnet clean removes them, and include $(MSBuildProjectFile) in Inputs to rerun on project changes.

Why does my project rebuild in Visual Studio but not on the command line?

Visual Studio uses its own Fast Up-to-Date Check (FUTDC) separate from MSBuild's Inputs/Outputs mechanism, which can be wrong for custom targets or non-standard item types. Set DisableFastUpToDateCheck to true or enable verbose up-to-date check logging to diagnose.

When should I not use incremental build diagnostics?

Do not use this approach for first-time build slowness, parallelism problems, or evaluation-phase slowness, which require different diagnostics. It also does not apply to non-MSBuild build systems.