dotnet-msbuild-diagnostics

Diagnose .NET builds from binary logs covering capture, failure triage, BuildCheck, and performance.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/bsamiee/Rasm --skill dotnet-msbuild-diagnostics-bsamiee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-msbuild-diagnostics
Source: https://github.com/bsamiee/Rasm/tree/main/.claude/skills/dotnet-msbuild-diagnostics
Command: npx skills add https://github.com/bsamiee/Rasm --skill dotnet-msbuild-diagnostics-bsamiee

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? .NET build failures and slowdowns are hard to investigate from console output alone. This Skill turns MSBuild binary logs (.binlog) into actionable diagnoses, covering capture, error triage, shared output path defects, and build performance analysis through the binlog MCP server tools. ## Core Features & Use Cases - Binlog Capture and Tooling: Capture one .binlog per MSBuild invocation with -bl:<dir>/<purpose>-{}.binlog and query it through 40+ MCP tools such as binlog_overview, binlog_diagnose, binlog_errors, and binlog_explain_property. - Failed Build Triage: Route each error class (CS*, MSB*, NU*, NETSDK*, BC*) to the right diagnostic tool and fix the first error before the next capture. - BuildCheck and Shared Output Paths: Run dotnet build -check to surface BC0101-BC0302 findings and detect projects or instances sharing OutputPath or IntermediateOutputPath. - Performance Analysis: Measure evaluation cost, incremental build behavior, critical path, analyzer time, and Copy task cost as deltas between comparable captures. - Use Case: A solution builds slowly and intermittently fails with MSB3026 file locks. Capture a binlog, run binlog_diagnose and binlog_double_writes, identify two project instances sharing one obj directory, and fix the duplicate global property causing the extra instance. ## Quick Start Ask the AI to diagnose your failing or slow .NET build by capturing a binlog with dotnet build -bl and analyzing it with the binlog MCP tools.

Frequently Asked Questions about dotnet-msbuild-diagnostics

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

FAQPage Schema
How do I diagnose a failed .NET build from a binlog file?▼

Capture the build with dotnet build -bl:<dir>/build-{}.binlog, then run binlog_overview, binlog_diagnose, and binlog_errors in order. Route the error class using the triage table, for example MSB4019 to binlog_imports or NU1* restore errors to binlog_nuget, and fix the first error before recapturing.

How to capture an MSBuild binary log with dotnet build?▼

Pass -bl:<dir>/<purpose>-{}.binlog on any dotnet command that runs MSBuild; MSBuild replaces {} with a UTC timestamp, process id, and random string so each invocation writes one file. Failed builds keep the log, and imports are embedded by default.

What is BuildCheck in MSBuild and how do I run it?▼

BuildCheck runs inbox build checks via dotnet build -check and reports each finding as a BC-coded diagnostic, such as BC0101 for shared output paths or BC0201 for uninitialized property reads. Configure severity and scope per code in .editorconfig under a section header.

Why does my .NET build fail with MSB3026 copy retries or file locks?▼

MSB3026 typically indicates projects or project instances sharing one OutputPath or IntermediateOutputPath, causing double writes in parallel builds. Detect it with dotnet build -check (BC0101/BC0102), binlog_compare_property on IntermediateOutputPath, and binlog_double_writes.

Can binlog MCP tools handle very large log files?▼

Yes. Above 200 MB the server answers tree queries from an automatically extracted subtree and caches it for seven days; BINLOG_MCP_AUTO_EXTRACT_MB sets the threshold. For targeted investigations, use binlog_extract_preview and binlog_extract to scope the analysis to selected projects.

How do I find why my .NET build is slow?▼

Capture comparable builds with -bl, then run binlog_build_graph for the critical path, binlog_expensive_projects and binlog_expensive_targets for the slowest work, and binlog_analyzer_summary on a -p:ReportAnalyzer=true capture for analyzer cost. Compare results only against captures taken under identical conditions.