binlog-generation
/binlog-generation
Generuje binarne logi MSBuild (binlogi) do diagnostyki buildów przez dodanie /bl:{} do poleceń dotnet build, test, pack, publish i restore, jako podstawę analizy błędów i wydajności.
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Generuje binarne logi MSBuild (binlogi) do diagnostyki buildów przez dodanie /bl:{} do poleceń dotnet build, test, pack, publish i restore, jako podstawę analizy błędów i wydajności.
Wyzwalacze z opisu
Oryginalny opis (EN)
Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding /bl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ / .NET 8 SDK+ for {} placeholder; PowerShell must quote the complete switch as '-bl:{}'. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use binlog-failure-analysis instead), binlog MCP startup fa
Jak działa
- Commands That Require /bl
- Preferred: Use {} for Automatic Unique Names
- Why This Matters
- Examples
- One build = one binlog
- Verify the binlog exists
- When a Specific Filename Is Required
- Cleaning the Repository
Podgląd SKILL.md
---
name: binlog-generation
description: "Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding /bl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ / .NET 8 SDK+ for {} placeholder; PowerShell must quote the complete switch as '-bl:{}'. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use binlog-failure-analysis instead), binlog MCP startup failures (use troubleshoot-binlog-mcp)."
license: MIT
---
# Generate Binary Logs
**Pass the `/bl` switch when running any MSBuild-based command.** This is a non-negotiable requirement for all .NET builds.
## Commands That Require /bl
You MUST add the `/bl:{}` flag to:
- `dotnet build`
- `dotnet test`
- `dotnet pack`
- `dotnet publish`
- `dotnet restore`
- `msbuild` or `msbuild.exe`
- Any other command that invokes MSBuild
## Preferred: Use `{}` for Automatic Unique Names
> **Note:** The `{}` placeholder requires MSBuild 17.8+ / .NET 8 SDK or later.
The `{}` placeholder in the binlog filename is replaced by MSBuild with a unique identifier, guaranteeing no two builds ever overwrite each other — without needing to track or check existing files.
```bash
# Every invocation produces a distinct file automatically
dotnet build /bl:{}
dotnet test /bl:{}
dotnet build --configuration Release /bl:{}
```
**PowerShell requires quoting the complete switch:**
```powershell
# Keep the literal {} placeholder in one argument
dotnet build '-bl:{}'
dotnet test '-bl:{}'
```
## Why This Matters
1. **Unique names prevent overwrites** - You can always go back and analyze previous builds
2. **Failure analysis** - When a build fails, the binlog is already there for immediate analysis
3. **Comparison** - You can compare builds before and after changes
4. **No re-running builds** - You never need to re-run a failed build just to generate a binlog
## Examples
```bash
# ✅ CORRECT - {} generates a unique name automatically (bash/cmd)
dotnet build /bl:{}
dotnet test /bl:{}
# ✅ CORRECT - quote the complete PowerShell argument
dotnet build '-bl:{}'
dotnet test '-bl:{}'
# ❌ WRONG - Missing /bl flag entirely
dotnet build
dotnet test
# ❌ WRONG - No filename (overwrites the same msbuild.binlog every time)
dotnet build /bl
dotnet build /bl
```
## One build = one binlog
Add `/bl:{}` to **every** MSBuild invocation separately — never reuse a name and
never rely on bare `/bl`:
- Building several configurations, projects, or retrying a failed build? Each
command still gets its own `/bl:{}` so the logs never overwrite each other.
```bash
dotnet build -c Debug /bl:{} # unique file
dotnet build -c Release /bl:{} # another unique file
```
## Verify the binlog exists
After the build, confirm a `.binlog` was actually produced before moving on to
analysis — a build that fails *before* MSBuild starts (e.g. a bad argument)
writes no binlog:
```bash
ls -1 *.binlog # bash
dir /b *.binlog # Windows cmd
```
```powershell
Get-ChildItem *.binlog # PowerShell
```
Note the resulting path so `binlog-failure-analysis` or `build-perf-diagnostics`
can consume it.
## When a Specific Filename Is Required
If the binlog filename needs to be known upfront (e.g., for CI artifact upload), or if `{}` is not available in the installed MSBuild version, pick a name that won't collide with existing files:
1. Check for existing `*.binlog` files in the directory
2. Choose a name not already taken (e.g., by incrementing a counter from the highest existing number)
```bash
# Example: directory contains 3.binlog — use 4.binlog
dotnet build /bl:4.binlog
```
## Cleaning the Repository
When cleaning the repository with `git clean`, **always exclude binlog files** to preserve your build history:
```bash
# ✅ CORRECT - Exclude binlog files from cleaning
git clean -fdx -e "*.binlog"
# ❌ WRONG - This deletes binlog files (they're usually in .gitignore)
git clean -fdx
```
This is especially important when iterating on build fixes - you need the binlogs to analyze what changed between builds.
Wersje
W bazie nie ma innych skilli o nazwie binlog-generation.
Identyczna treść występuje jeszcze w 5 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki ad263965573d (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100binlog-failure-analysis
Analizuje binarne logi MSBuild (.binlog), by zdiagnozować błędy buildu niejasne z konsoli: kaskadowe awarie w wieloprojektowych buildach, kolejność wykonania targetów i inne problemy MSBuild. - 100binlog-failure-analysis
Analizuje binarne logi MSBuild (.binlog), by zdiagnozować błędy buildu niejasne z konsoli: kaskadowe awarie w wieloprojektowych buildach, kolejność wykonania targetów i inne problemy MSBuild. - 100troubleshoot-binlog-mcp
Diagnozuje błędy uruchamiania serwera binlog MCP w dotnet-msbuild, sprawdzając SDK, feedy i mapowanie źródeł. - 100dotnet-engineering
Ustala standardy pracy w .NET i C#: dotnet test, jakość testów, BenchmarkDotNet, diagnoza MSBuild z binlog, ostrzeżenia trimmingu i AOT oraz publikacja pakietu NuGet z GitHub Actions. - 100binlog-failure-analysis
Analizuje nieudany build PR w Azure DevOps na podstawie binloga, który build już wytworzył, bez lokalnego przebudowywania, i publikuje analizę przyczyn źródłowych jako przegląd PR przez serwer MCP binlog. - 90dotnet
Pomaga w pracy z .NET: C#, MSBuild, ASP.NET Core, EF Core, MAUI, NuGet, testami i narzędziami SDK.