{"id":4667,"date":"2026-07-27T17:11:49","date_gmt":"2026-07-27T17:11:49","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2026\/07\/27\/analyze-msbuild-binary-logs-with-copilot-in-vs-code\/"},"modified":"2026-07-27T17:11:49","modified_gmt":"2026-07-27T17:11:49","slug":"analyze-msbuild-binary-logs-with-copilot-in-vs-code","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2026\/07\/27\/analyze-msbuild-binary-logs-with-copilot-in-vs-code\/","title":{"rendered":"Analyze MSBuild Binary Logs with Copilot in VS Code"},"content":{"rendered":"<p>You know the moment. CI goes red, or a build that took 8 seconds yesterday now<br \/>\ntakes 40, and you\u2019re staring at a wall of MSBuild output trying to find the one<br \/>\nline that matters. The answer is almost always sitting in the <strong><a href=\"https:\/\/learn.microsoft.com\/visualstudio\/msbuild\/obtaining-build-logs-with-msbuild#save-a-binary-log\">binary log<\/a><\/strong><br \/>\n(<code>.binlog<\/code>) \u2013 it records every project, target, task, property, and diagnostic<br \/>\nin the build. The problem is that reading one has meant firing up a separate<br \/>\nviewer and already knowing where to look.<\/p>\n<p>What if you could just <em>ask<\/em>?<\/p>\n<p>That\u2019s the idea behind the <strong>MSBuild Binlog Analyzer<\/strong> for VS Code, now in<br \/>\n<strong>Preview<\/strong> on the<br \/>\n<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-dotnettools.msbuild-binlog-analyzer\">Visual Studio Marketplace<\/a>.<br \/>\nIt brings binlog analysis right into your editor and hands the tedious detective<br \/>\nwork to <strong>GitHub Copilot Chat<\/strong> \u2013 so you can stay in the flow and keep shipping.<\/p>\n<blockquote>\n<p><strong>Just want an agent to investigate builds for you \u2013 say, unattended in CI?<\/strong><br \/>\nCheck out the <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/msbuild-binlog-mcp-server\/\">Microsoft Binlog MCP Server<\/a> \u2013<br \/>\nthe same analysis engine, driven headlessly. This post is about the interactive, in-editor experience.<\/p>\n<\/blockquote>\n<h2>The problems it solves<\/h2>\n<p>Build logs are the best evidence you have and the most annoying to read. The<br \/>\nBinlog Analyzer turns that evidence into answers:<\/p>\n<ul>\n<li><strong>\u201cWhy did my build fail?\u201d<\/strong> Get a plain-language root cause instead of<br \/>\nscrolling NuGet restore noise \u2013 and <strong>fix it with a single click<\/strong>, right in<br \/>\nVS Code.<\/li>\n<li><strong>\u201cWhy is this slow?\u201d<\/strong> See the slowest targets and tasks ranked, with the<br \/>\n<strong>critical path<\/strong> that actually gates your build time highlighted for you.<\/li>\n<li><strong>\u201cWhat changed?\u201d<\/strong> <strong>Compare two builds<\/strong> side by side and get an itemized<br \/>\ndiff of timing, diagnostics, properties, and package versions \u2013 so \u201cit feels<br \/>\nslower\u201d becomes \u201cCoreCompile regressed by 14.7s.\u201d<\/li>\n<li><strong>\u201cIs my incremental build working?\u201d<\/strong> Find out which targets rebuilt and<br \/>\n<em>why<\/em>, instead of guessing.<\/li>\n<\/ul>\n<p>No context-switching, no separate tool, no decoding MSBuild by hand.<\/p>\n<h2>What it is<\/h2>\n<p>Under the hood, the extension pairs with a .NET global-tool MCP server,<br \/>\n<a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.AITools.BinlogMcp\">Microsoft.AITools.BinlogMcp<\/a>,<br \/>\nwhich exposes <strong>dozens of build-analysis tools<\/strong> over the Model Context Protocol.<br \/>\nCopilot calls those tools to ground its answers in your actual log \u2013 not<br \/>\nguesswork. Best of all, the server is <strong>auto-installed on first use<\/strong>, so<br \/>\nthere\u2019s nothing to wire up by hand.<\/p>\n<p><img data-opt-id=466510761  fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2026\/07\/binlog-explorer-empty-scaled.webp\" alt=\"Binlog Explorer sidebar before a log loads, showing Load, Build &amp; Collect, and Download from CI\/CD actions.\" \/><\/p>\n<h2>Install<\/h2>\n<ol>\n<li>Install the extension from the Marketplace. You\u2019ll need <strong>VS Code 1.99+<\/strong>,<br \/>\n<strong>GitHub Copilot<\/strong>, and the <strong>.NET SDK<\/strong>.<\/li>\n<li>Open a <code>.binlog<\/code> in one of three ways: <strong>Binlog: Load File<\/strong> from the Command<br \/>\nPalette (<code>Ctrl+Shift+P<\/code>), <strong>Build &amp; Collect Binlog<\/strong> to build and capture in<br \/>\none step, or <strong>Open in VS Code<\/strong> from the<br \/>\n<a href=\"https:\/\/github.com\/KirillOsenkov\/MSBuildStructuredLog\">Structured Log Viewer<\/a>.<\/li>\n<li>Ask <code>@binlog<\/code> in Copilot Chat:<\/li>\n<\/ol>\n<pre><code class=\"language-text\">@binlog why did the build fail?\n@binlog what are the slowest targets?\n@binlog \/perf<\/code><\/pre>\n<p><img data-opt-id=733344024  fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2026\/07\/build-collect-summary-scaled.webp\" alt=\"Build &amp; Collect captures a log; @binlog \/summary shows a Build Overview with result, duration, and error counts.\" \/><\/p>\n<h2>A tour of the best parts<\/h2>\n<h3>The Binlog Explorer is your map<\/h3>\n<p>The sidebar tree lays the whole build out at a glance: <strong>Loaded Binlogs<\/strong>,<br \/>\n<strong>Projects<\/strong>, <strong>Errors<\/strong>, <strong>Warnings<\/strong>, and a <strong>Performance<\/strong> section with the<br \/>\nslowest targets, slowest tasks, rebuild reasons, and analyzer timing.<br \/>\nDiagnostics also light up VS Code\u2019s native <strong>Problems<\/strong> panel with per-project<br \/>\nCodeLens and an <strong>Ask @binlog<\/strong> action \u2013 so an error in the tree is one click<br \/>\nfrom an explanation.<\/p>\n<h3><code>@binlog<\/code> chat \u2013 and fixing the build in one click<\/h3>\n<p>This is where analysis becomes a conversation. Ask open-ended questions, or<br \/>\nreach for slash commands like <code>\/errors<\/code>, <code>\/perf<\/code>, <code>\/timeline<\/code>, <code>\/compare<\/code>,<br \/>\n<code>\/summary<\/code>, <code>\/incremental<\/code>, and <code>\/buildcheck<\/code>. Because the participant calls the<br \/>\nMCP tools directly, every answer cites real data from the log.<\/p>\n<p>Then comes the part people love: <strong>Fix all issues<\/strong>. Copilot reads the failing<br \/>\nproject, applies the fix, rebuilds, and loads the before\/after binlogs so you<br \/>\ncan confirm it worked \u2013 all without leaving the editor. Prefer to go one at a<br \/>\ntime? Right-click any diagnostic and choose <strong>Auto-fix with Copilot<\/strong>.<\/p>\n<p><img data-opt-id=809401960  data-opt-src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2026\/07\/binlog-chat-summary-scaled.webp\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"The @binlog \/summary response explains an NU1102 package error and suggests the PackageReference fix.\" \/><\/p>\n<h3>Catch regressions before they ship<\/h3>\n<p>Set any loaded <code>.binlog<\/code> as a <strong>baseline<\/strong>, and every new build is compared<br \/>\nagainst it automatically. A <strong>Build: +X% vs baseline<\/strong> badge appears in the<br \/>\nstatus bar, and a <strong>Regressions<\/strong> node spells out exactly what changed: slower<br \/>\ntargets, added or removed diagnostics, MSBuild property diffs, and NuGet package<br \/>\nversion changes. Hand any single regression straight to <code>@binlog<\/code> to dig in.<\/p>\n<p><img data-opt-id=819548294  data-opt-src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2026\/07\/regressions-tree-scaled.webp\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"The Regressions node lists slower targets like CoreCompile while @binlog investigates one target regression.\" \/><\/p>\n<h3>Compare two builds, visually<\/h3>\n<p>The <strong>Build Comparison<\/strong> view lines up two logs target-by-target with deltas,<br \/>\nand the project graph highlights the <strong>critical path<\/strong> computed by the MCP<br \/>\nserver. In the example below, Copilot traces a +473% spike straight to a<br \/>\ncold-start <code>CoreCompile<\/code> and explains it\u2019s a first-compile cost \u2013 not a problem<br \/>\nwith your code. That\u2019s the difference between a number and an answer.<\/p>\n<p><img data-opt-id=1206534557  data-opt-src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2026\/07\/build-comparison-scaled.webp\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"Build Comparison shows targets A vs B with deltas; Copilot explains where 23.7s went, CoreCompile dominating.\" \/><\/p>\n<h3>And there\u2019s more<\/h3>\n<p>The extension is packed with extras worth exploring:<\/p>\n<ul>\n<li><strong>Build Timeline<\/strong> \u2013 visual bar charts of target and task durations, with<br \/>\nclick-to-analyze in Copilot.<\/li>\n<li><strong>Optimize build<\/strong> \u2013 pick optimizations, let Copilot apply them, and verify<br \/>\nthe win with an automatic A\/B comparison.<\/li>\n<li><strong>CI\/CD integration<\/strong> \u2013 download binlogs from <strong>Azure DevOps Pipelines<\/strong> and<br \/>\n<strong>GitHub Actions<\/strong>, filtered by branch or PR, and analyze a failed CI build<br \/>\nwithout leaving VS Code.<\/li>\n<li><strong>Search<\/strong> \u2013 query across every build event: targets, tasks, messages, and<br \/>\nproperties.<\/li>\n<li><strong>Language Model tools<\/strong> (<code>binlog_lm_overview<\/code>, <code>binlog_lm_errors<\/code>,<br \/>\n<code>binlog_lm_search<\/code>, <code>binlog_lm_perf<\/code>, <code>binlog_lm_compare<\/code>) \u2013 available to<br \/>\nagent mode and custom chat modes, plus a ready-made <strong>Build Analysis<\/strong> chat<br \/>\nmode that works with any agent.<\/li>\n<\/ul>\n<h2>Try it<\/h2>\n<p>The MSBuild Binlog Analyzer is in <strong>Preview<\/strong> and under active development.<br \/>\nInstall it from the<br \/>\n<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-dotnettools.msbuild-binlog-analyzer\">Visual Studio Marketplace<\/a>,<br \/>\npoint it at a <code>.binlog<\/code>, and ask <code>@binlog<\/code> your next build question. The next<br \/>\nred build might just fix itself. We\u2019d love your feedback.<\/p>\n<h2>Feedback<\/h2>\n<p>The MSBuild Binlog Analyzer is built in the open, and your feedback shapes<br \/>\nwhere it goes next. Found a bug, hit a rough edge, or have an idea for a<br \/>\nfeature? Please open an issue in the<br \/>\n<a href=\"https:\/\/github.com\/dotnet\/skills\/issues\">dotnet\/skills<\/a> repository \u2013 bug<br \/>\nreports, feature requests, and general feedback are all welcome. Let us know<br \/>\nwhat\u2019s working, what isn\u2019t, and what you\u2019d like to see next.<\/p>\n<p>The post <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/msbuild-binlog-analyzer-vscode\/\">Analyze MSBuild Binary Logs with Copilot in VS Code<\/a> appeared first on <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\">.NET Blog<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>You know the moment. CI goes red, or a build that took 8 seconds yesterday now takes 40, and you\u2019re [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4668,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[7],"tags":[],"class_list":["post-4667","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet"],"_links":{"self":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/4667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/comments?post=4667"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/4667\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media\/4668"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=4667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=4667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=4667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}