binlog-failure-analysis
ما الذي تفعله
تحلل هذه المهارة سجل بناء ثنائيًا من MSBuild لمعرفة سبب فشل بناء .NET. وهي موجهة للمطورين الذين يواجهون أخطاء بناء غير واضحة في مخرجات وحدة التحكم.
متى تستخدمها
- ✓عندما يكون خطأ بناء .NET غير واضح من مخرجات وحدة التحكم.
- ✓عندما يسبب فشل واحد أخطاء كثيرة عبر بناء متعدد المشاريع.
- ✓عندما تريد معرفة الترتيب الذي نُفذت فيه أهداف البناء.
رابط المهارة
https://github.com/dotnet/skills/blob/main/plugins/dotnet-msbuild/skills/binlog-failure-analysis/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هذا binlog من بناء .NET الفاشل لدي. ابحث عن أول خطأ حقيقي وما الذي سببه.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يستخدم وكيلك أدوات السجل الثنائي لفحص الأخطاء والأهداف والمشاريع، ويتتبع سلسلة الأخطاء حتى أول فشل، ثم يلخص السبب المرجّح.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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
.binlogfile is a binary format — do NOT try tocat,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
الأسئلة الشائعة
هل أحتاج إلى ملف binlog؟
نعم. تحتاج المهارة إلى سجل ثنائي موجود، ينتج عن إضافة مفتاح سجل إلى البناء.
هل تنشئ السجل؟
لا. إنشاء السجلات تغطيه مهارة منفصلة.
هل تقرأ السجل كنص؟
لا. السجل ثنائي، لذلك يستعلم الوكيل عنه بأدوات منظمة.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 5.8k
- الترتيب
- #14590
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
create-custom-agent
5.8kيساعد وكيلك على إنشاء ملفات وكلاء مخصصين لـVS Code، لكل منهم أدواته وتعليماته وتسليماته إلى وكلاء آخرين.
create-skill
5.8kيساعد وكيلك على إنشاء مهارة وكيل جديدة باسم صالح ووصف محفّز واضح وملف SKILL.md يتبع المعيار.
csharp-scripts
5.8kيساعد وكيلك على تشغيل برنامج C# صغير كملف واحد بأداة سطر أوامر .NET، دون إنشاء مشروع كامل.
dotnet-pinvoke
5.8kيساعد وكيلك على استدعاء مكتبات C أو C++ الأصلية من .NET بشكل صحيح، مع التوقيعات ومعالجة النصوص والذاكرة والمقابض الآمنة.
مهارات مشابهة
openclaw-update
394kيساعد وكيلك على تحديث بوابة OpenClaw Gateway الموجودة، مع اختيار طريقة التحديث المناسبة لطريقة تثبيتها والحفاظ على جلستك.
diagnose-gateway
394kيساعد وكيلك على معرفة سبب فشل بوابة OpenClaw Gateway عبر فحص الإعدادات والقنوات والمنافذ دون تغيير أي شيء.
crabbox-apps
394kيساعد وكيلك على فتح تطبيق وتشغيله على جهاز سحابي مؤقت، ثم عرض واجهته في الشريط الجانبي للدردشة.