Pular para o conteúdo
Skillpedia
Deploy e nuvem (DevOps)5,8 mil · #14590

binlog-failure-analysis

O que ela faz

Esta skill analisa um log binário de build do MSBuild para descobrir por que um build .NET falhou. É para desenvolvedores que enfrentam erros de build pouco claros na saída do console.

Quando usar

  • ✓Quando um erro de build .NET não fica claro na saída do console.
  • ✓Quando uma falha causa muitos erros em um build com vários projetos.
  • ✓Quando você quer ver a ordem em que os alvos do build foram executados.

Link da skill

https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/binlog-failure-analysis/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/binlog-failure-analysis/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Aqui está um binlog do meu build .NET que falhou. Encontre o primeiro erro real e o que o causou.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente usa as ferramentas de log binário para inspecionar erros, alvos e projetos, segue a cascata até a primeira falha e resume a causa provável.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

Analyzing MSBuild Failures with Binary Logs

This skill diagnoses MSBuild build failures from a .binlog file. The preferred path uses the binlog MCP server (Microsoft.AITools.BinlogMcp, exposed under the binlog MCP namespace) which is bundled with this plugin. If the MCP server is not available, use troubleshoot-binlog-mcp to diagnose startup when repair is wanted. If repair is blocked, declined, or unnecessary for this task, continue with the binlog replay workflow at the bottom.

Primary workflow — binlog MCP

The MCP server exposes structured tools for inspecting a .binlog without parsing text logs. Call them directly instead of replaying the binlog to a text file. Call tools/list for the MCP first if you are unsure which tools are available.

Important constraints:

  • The .binlog file is a binary format — do NOT try to cat, head, strings, or read it directly. Use only the MCP tools to query it.
  • The original source/project files might or might NOT be available on disk. Project files (.csproj, .props, .targets, App.config, etc.) - if you cannot locate them on disk, they can only be read from within the binlog via MCP tools (e.g., embedded/source file retrieval).
  • Synthesize findings as you go. Do not spend all available time investigating — once you have enough evidence, present your conclusions. A partial answer with clear reasoning is better than timing out mid-investigation.

Use the available MCP server tools to query the binary log for:

  • Build errors and warnings
  • MSBuild properties and their values
  • MSBuild items (PackageReference, ProjectReference, etc.)
  • Project evaluation data
  • Target execution details
  • File contents embedded in the binlog

Fallback workflow — text-log replay (when MCP is unavailable)

Use this only when the MCP server cannot be started (for example, on an older SDK or in an offline environment).

Replay the binlog to text logs

dotnet msbuild build.binlog -noconlog \
  -fl  "-flp:v=diag;logfile=full.log;performancesummary" \
  -fl1 "-flp1:errorsonly;logfile=errors.log" \
  -fl2 "-flp2:warningsonly;logfile=warnings.log"

PowerShell note: Use -flp:"v=diag;logfile=full.log;performancesummary" (quoted semicolons).

Search the text logs

cat errors.log
grep -n -B2 -A2 "CS0246" full.log
grep -i "CoreCompile.*FAILED\|Build FAILED\|error MSB" full.log
grep 'Target "CoreCompile"' full.log | grep -oP 'project "[^"]*"'

Generating a binlog (only if none exists)

dotnet build /bl:build.binlog
Perguntas frequentes

Preciso de um arquivo binlog?

Sim. A skill precisa de um log binário existente, que é gerado ao adicionar uma opção de log ao build.

Ela pode gerar o log?

Não. Gerar logs é coberto por uma skill separada.

Ela lê o log como texto?

Não. O log é binário, então o agente o consulta com ferramentas estruturadas.

Detalhes

Descrição original do autor

Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating binlogs (use binlog-generation), binlog MCP startup or connection failures (use troubleshoot-binlog-mcp), non-MSBuild build systems.

repo: dotnet/skills

Popularidade

Estrelas no GitHub
5,8 mil
Posição no ranking
#14590
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas