{"id":60481,"date":"2026-07-27T10:00:00","date_gmt":"2026-07-27T17:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=60481"},"modified":"2026-07-27T10:00:00","modified_gmt":"2026-07-27T17:00:00","slug":"msbuild-binlog-analyzer-vscode","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/msbuild-binlog-analyzer-vscode\/","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\ntakes 40, and you&#8217;re staring at a wall of MSBuild output trying to find the one\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>\n(<code>.binlog<\/code>) &#8211; it records every project, target, task, property, and diagnostic\nin the build. The problem is that reading one has meant firing up a separate\nviewer and already knowing where to look.<\/p>\n<p>What if you could just <em>ask<\/em>?<\/p>\n<p>That&#8217;s the idea behind the <strong>MSBuild Binlog Analyzer<\/strong> for VS Code, now in\n<strong>Preview<\/strong> on the\n<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-dotnettools.msbuild-binlog-analyzer\">Visual Studio Marketplace<\/a>.\nIt brings binlog analysis right into your editor and hands the tedious detective\nwork to <strong>GitHub Copilot Chat<\/strong> &#8211; 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 &#8211; say, unattended in CI?<\/strong>\nCheck out the <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/msbuild-binlog-mcp-server\/\">Microsoft Binlog MCP Server<\/a> &#8211;\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\nBinlog Analyzer turns that evidence into answers:<\/p>\n<ul>\n<li><strong>&#8220;Why did my build fail?&#8221;<\/strong> Get a plain-language root cause instead of\nscrolling NuGet restore noise &#8211; and <strong>fix it with a single click<\/strong>, right in\nVS Code.<\/li>\n<li><strong>&#8220;Why is this slow?&#8221;<\/strong> See the slowest targets and tasks ranked, with the\n<strong>critical path<\/strong> that actually gates your build time highlighted for you.<\/li>\n<li><strong>&#8220;What changed?&#8221;<\/strong> <strong>Compare two builds<\/strong> side by side and get an itemized\ndiff of timing, diagnostics, properties, and package versions &#8211; so &#8220;it feels\nslower&#8221; becomes &#8220;CoreCompile regressed by 14.7s.&#8221;<\/li>\n<li><strong>&#8220;Is my incremental build working?&#8221;<\/strong> Find out which targets rebuilt and\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,\n<a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.AITools.BinlogMcp\">Microsoft.AITools.BinlogMcp<\/a>,\nwhich exposes <strong>dozens of build-analysis tools<\/strong> over the Model Context Protocol.\nCopilot calls those tools to ground its answers in your actual log &#8211; not\nguesswork. Best of all, the server is <strong>auto-installed on first use<\/strong>, so\nthere&#8217;s nothing to wire up by hand.<\/p>\n<p><img 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&#8217;ll need <strong>VS Code 1.99+<\/strong>,\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\nPalette (<code>Ctrl+Shift+P<\/code>), <strong>Build &amp; Collect Binlog<\/strong> to build and capture in\none step, or <strong>Open in VS Code<\/strong> from the\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 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>,\n<strong>Projects<\/strong>, <strong>Errors<\/strong>, <strong>Warnings<\/strong>, and a <strong>Performance<\/strong> section with the\nslowest targets, slowest tasks, rebuild reasons, and analyzer timing.\nDiagnostics also light up VS Code&#8217;s native <strong>Problems<\/strong> panel with per-project\nCodeLens and an <strong>Ask @binlog<\/strong> action &#8211; so an error in the tree is one click\nfrom an explanation.<\/p>\n<h3><code>@binlog<\/code> chat &#8211; and fixing the build in one click<\/h3>\n<p>This is where analysis becomes a conversation. Ask open-ended questions, or\nreach for slash commands like <code>\/errors<\/code>, <code>\/perf<\/code>, <code>\/timeline<\/code>, <code>\/compare<\/code>,\n<code>\/summary<\/code>, <code>\/incremental<\/code>, and <code>\/buildcheck<\/code>. Because the participant calls the\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\nproject, applies the fix, rebuilds, and loads the before\/after binlogs so you\ncan confirm it worked &#8211; all without leaving the editor. Prefer to go one at a\ntime? Right-click any diagnostic and choose <strong>Auto-fix with Copilot<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2026\/07\/binlog-chat-summary-scaled.webp\" 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\nagainst it automatically. A <strong>Build: +X% vs baseline<\/strong> badge appears in the\nstatus bar, and a <strong>Regressions<\/strong> node spells out exactly what changed: slower\ntargets, added or removed diagnostics, MSBuild property diffs, and NuGet package\nversion changes. Hand any single regression straight to <code>@binlog<\/code> to dig in.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2026\/07\/regressions-tree-scaled.webp\" 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,\nand the project graph highlights the <strong>critical path<\/strong> computed by the MCP\nserver. In the example below, Copilot traces a +473% spike straight to a\ncold-start <code>CoreCompile<\/code> and explains it&#8217;s a first-compile cost &#8211; not a problem\nwith your code. That&#8217;s the difference between a number and an answer.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2026\/07\/build-comparison-scaled.webp\" alt=\"Build Comparison shows targets A vs B with deltas; Copilot explains where 23.7s went, CoreCompile dominating.\" \/><\/p>\n<h3>And there&#8217;s more<\/h3>\n<p>The extension is packed with extras worth exploring:<\/p>\n<ul>\n<li><strong>Build Timeline<\/strong> &#8211; visual bar charts of target and task durations, with\nclick-to-analyze in Copilot.<\/li>\n<li><strong>Optimize build<\/strong> &#8211; pick optimizations, let Copilot apply them, and verify\nthe win with an automatic A\/B comparison.<\/li>\n<li><strong>CI\/CD integration<\/strong> &#8211; download binlogs from <strong>Azure DevOps Pipelines<\/strong> and\n<strong>GitHub Actions<\/strong>, filtered by branch or PR, and analyze a failed CI build\nwithout leaving VS Code.<\/li>\n<li><strong>Search<\/strong> &#8211; query across every build event: targets, tasks, messages, and\nproperties.<\/li>\n<li><strong>Language Model tools<\/strong> (<code>binlog_lm_overview<\/code>, <code>binlog_lm_errors<\/code>,\n<code>binlog_lm_search<\/code>, <code>binlog_lm_perf<\/code>, <code>binlog_lm_compare<\/code>) &#8211; available to\nagent mode and custom chat modes, plus a ready-made <strong>Build Analysis<\/strong> chat\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.\nInstall it from the\n<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-dotnettools.msbuild-binlog-analyzer\">Visual Studio Marketplace<\/a>,\npoint it at a <code>.binlog<\/code>, and ask <code>@binlog<\/code> your next build question. The next\nred build might just fix itself. We&#8217;d love your feedback.<\/p>\n<h2>Feedback<\/h2>\n<p>The MSBuild Binlog Analyzer is built in the open, and your feedback shapes\nwhere it goes next. Found a bug, hit a rough edge, or have an idea for a\nfeature? Please open an issue in the\n<a href=\"https:\/\/github.com\/dotnet\/skills\/issues\">dotnet\/skills<\/a> repository &#8211; bug\nreports, feature requests, and general feedback are all welcome. Let us know\nwhat&#8217;s working, what isn&#8217;t, and what you&#8217;d like to see next.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Meet the MSBuild Binlog Analyzer for VS Code &#8211; a Copilot-powered way to read MSBuild binary logs, explain and fix build failures with one click, compare builds, and catch regressions, backed by the Microsoft.AITools.BinlogMcp MCP server.<\/p>\n","protected":false},"author":214104,"featured_media":60482,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7781,7593],"tags":[8182,8181,8193,7869,8032,8053,98,7578],"class_list":["post-60481","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-ai","category-visual-studio-code","tag-binlog","tag-build-diagnostics","tag-build-performance","tag-github-copilot","tag-mcp","tag-model-context-protocol","tag-msbuild","tag-vs-code"],"acf":[],"blog_post_summary":"<p>Meet the MSBuild Binlog Analyzer for VS Code &#8211; a Copilot-powered way to read MSBuild binary logs, explain and fix build failures with one click, compare builds, and catch regressions, backed by the Microsoft.AITools.BinlogMcp MCP server.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/60481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/214104"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=60481"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/60481\/revisions"}],"predecessor-version":[{"id":60483,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/60481\/revisions\/60483"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/60482"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=60481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=60481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=60481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}