Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)5.8k · #14590

binlog-failure-analysis

Ce qu’il fait

Cette skill analyse un journal de build binaire produit par MSBuild pour trouver pourquoi un build .NET a échoué. Elle s'adresse aux développeurs confrontés à des erreurs de build peu claires dans la sortie de la console.

Quand l’utiliser

  • ✓Quand une erreur de build .NET est peu claire dans la sortie de la console.
  • ✓Quand un seul échec provoque de nombreuses erreurs dans un build multiprojet.
  • ✓Quand vous voulez voir l'ordre d'exécution des cibles de build.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/binlog-failure-analysis/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Voici un binlog de mon build .NET en échec. Trouve la première vraie erreur et sa cause.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent utilise les outils de journal binaire pour inspecter les erreurs, les cibles et les projets, remonte la cascade jusqu'au premier échec et résume la cause probable.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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
Questions fréquentes

Ai-je besoin d'un fichier binlog ?

Oui. La skill a besoin d'un journal binaire existant, généré en ajoutant un commutateur de journal au build.

Peut-elle générer le journal ?

Non. La génération des journaux est couverte par une skill séparée.

Lit-elle le journal comme du texte ?

Non. Le journal est binaire, l'agent l'interroge donc avec des outils structurés.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
5.8k
Position au classement
#14590
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires