binlog-generation

Generate MSBuild binary logs by adding the /bl switch to dotnet build commands.

Updated Sep 22, 2026
One-click install
npx skills add https://github.com/bytecakelake/Nurse-Scheduler --skill binlog-generation-bytecakelake
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: binlog-generation
Source: https://github.com/bytecakelake/Nurse-Scheduler/tree/main/.agents/plugins/dotnet-msbuild/skills/binlog-generation
Command: npx skills add https://github.com/bytecakelake/Nurse-Scheduler --skill binlog-generation-bytecakelake

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Build failures and performance issues in .NET projects are hard to diagnose without a detailed execution trace, and re-running failed builds just to capture logs wastes time. This Skill ensures every MSBuild invocation produces a uniquely named binary log (binlog) that is ready for immediate post-build analysis. ## Core Features & Use Cases - Automatic unique binlog naming: Uses the /bl:{} placeholder (MSBuild 17.8+ / .NET 8 SDK+) so every build writes a distinct .binlog file that never overwrites previous logs. - Cross-shell guidance: Provides correct syntax for bash, cmd, and PowerShell (which requires -bl:{{}} brace escaping), plus fallback numbered filenames for older MSBuild versions or CI artifact uploads. - Build history preservation: Instructs to exclude *.binlog from git clean and to verify the binlog exists before handing it to analysis skills. - Use Case: A developer's Release build fails in CI. Because every build ran with /bl:{}, the binlog already exists and can be fed directly into binlog-failure-analysis or build-perf-diagnostics without re-running the build. ## Quick Start Add the /bl:{} flag to your dotnet build command and then confirm a .binlog file was created in the project directory.

Frequently Asked Questions about binlog-generation

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

FAQPage Schema
How do I generate a binlog with dotnet build?▼

Add the /bl:{} flag to any dotnet build, test, pack, publish, or restore command, for example dotnet build /bl:{}. MSBuild replaces {} with a unique identifier so each build writes its own .binlog file.

How to create MSBuild binary logs in PowerShell?▼

In PowerShell, escape the braces by writing dotnet build -bl:{{}}. The doubled braces prevent PowerShell from interpreting the placeholder, and MSBuild still generates a uniquely named binlog.

Does the /bl:{} placeholder work on older MSBuild versions?▼

The {} placeholder requires MSBuild 17.8+ or the .NET 8 SDK. On older versions, choose a filename manually by checking existing *.binlog files and incrementing a counter, such as /bl:4.binlog.

Why is my binlog missing after a failed build?▼

A build that fails before MSBuild starts, such as one with a bad command-line argument, writes no binlog. Verify output with ls *.binlog or Get-ChildItem *.binlog before starting analysis.

When should I not use binlog generation?▼

Do not use it for non-MSBuild build systems like npm, Maven, or CMake, since the /bl switch only exists in MSBuild. To analyze an existing binlog, use a binlog failure analysis skill instead.