From 1ac42abbe15bce6ddc4dbfe734591b31d017eb51 Mon Sep 17 00:00:00 2001 From: Yuliia Kovalova Date: Fri, 24 Jul 2026 12:42:15 +0200 Subject: [PATCH 1/2] Deprecate in favor of ms-dotnettools.msbuild-binlog-analyzer This dotutils extension has been superseded by the official Microsoft extension "MSBuild Binlog Analyzer for VS Code" (ms-dotnettools.msbuild-binlog-analyzer). Convert this build into a migration tombstone that guides users to the replacement: - activate(): best-effort, non-blocking deprecation prompt that offers to install the official extension and uninstall this one (skipped once the official extension is present or the user dismisses it). - package.json: mark displayName/description as DEPRECATED pointing at the new id; bump 0.10.27 -> 0.10.28 so a final notice release can ship. - README: prominent deprecation banner linking to the new Marketplace item. - CHANGELOG: 0.10.28 deprecation entry. Existing functionality is left intact so current users are not broken while they migrate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 270764ca-be14-46fc-a3b4-3361dd725c25 --- CHANGELOG.md | 5 ++++ README.md | 10 ++++++-- package.json | 6 ++--- src/deprecationNotice.ts | 52 ++++++++++++++++++++++++++++++++++++++++ src/extension.ts | 5 ++++ 5 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 src/deprecationNotice.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 632499b..62ed2f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.10.28 (Preview) + +### Deprecated +- **This extension has moved to the official Microsoft extension** — `dotutils.binlog-analyzer` is now published as [`ms-dotnettools.msbuild-binlog-analyzer`](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.msbuild-binlog-analyzer) ("MSBuild Binlog Analyzer for VS Code"). This `dotutils` build is deprecated and will no longer be updated. On activation it now offers to install the official extension and uninstall this one; the README and Marketplace listing point to the replacement. + ## 0.10.27 (Preview) ### Added diff --git a/README.md b/README.md index b90816c..a3b1544 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,13 @@ # MSBuild Binlog Analyzer for VS Code -[![VS Marketplace](https://img.shields.io/visual-studio-marketplace/v/dotutils.binlog-analyzer?label=VS%20Marketplace&color=blue)](https://marketplace.visualstudio.com/items?itemName=dotutils.binlog-analyzer) -[![Installs](https://img.shields.io/visual-studio-marketplace/i/dotutils.binlog-analyzer)](https://marketplace.visualstudio.com/items?itemName=dotutils.binlog-analyzer) +> # ⚠️ This extension is deprecated +> +> **`dotutils.binlog-analyzer` has moved to the official Microsoft extension:** +> **[MSBuild Binlog Analyzer for VS Code (`ms-dotnettools.msbuild-binlog-analyzer`)](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.msbuild-binlog-analyzer)** +> +> This `dotutils` version is no longer maintained and will not receive updates. +> Please install the official extension and uninstall this one. VS Code will +> also prompt you to migrate automatically. Analyze MSBuild binary logs (`.binlog`) with **GitHub Copilot Chat** and **MCP tools** — right from VS Code. diff --git a/package.json b/package.json index 1052b77..260652d 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "binlog-analyzer", - "displayName": "MSBuild Binlog Analyzer", - "description": "Analyze MSBuild binary logs with Copilot Chat and MCP tools", - "version": "0.10.27", + "displayName": "MSBuild Binlog Analyzer (DEPRECATED \u2014 use ms-dotnettools.msbuild-binlog-analyzer)", + "description": "DEPRECATED: install the official \"MSBuild Binlog Analyzer for VS Code\" (ms-dotnettools.msbuild-binlog-analyzer) instead. Analyze MSBuild binary logs with Copilot Chat and MCP tools.", + "version": "0.10.28", "preview": true, "publisher": "dotutils", "license": "MIT", diff --git a/src/deprecationNotice.ts b/src/deprecationNotice.ts new file mode 100644 index 0000000..3b5ff8d --- /dev/null +++ b/src/deprecationNotice.ts @@ -0,0 +1,52 @@ +import * as vscode from 'vscode'; + +/** + * This "dotutils" extension is deprecated in favor of the official Microsoft + * extension. On activation we nudge the user to install the replacement and + * (optionally) uninstall this one. The prompt is best-effort and must never + * block or break activation. + */ +const NEW_EXTENSION_ID = 'ms-dotnettools.msbuild-binlog-analyzer'; +const OLD_EXTENSION_ID = 'dotutils.binlog-analyzer'; +const DISMISS_KEY = 'binlog.deprecationNoticeDismissed'; + +export async function showDeprecationNotice(context: vscode.ExtensionContext): Promise { + try { + // Already migrated — the official extension is installed, so stay quiet. + if (vscode.extensions.getExtension(NEW_EXTENSION_ID)) { + return; + } + if (context.globalState.get(DISMISS_KEY)) { + return; + } + + const install = 'Install new extension'; + const details = 'What changed'; + const dismiss = "Don't show again"; + const choice = await vscode.window.showWarningMessage( + 'MSBuild Binlog Analyzer has moved to the official Microsoft extension ' + + '"MSBuild Binlog Analyzer for VS Code" (ms-dotnettools.msbuild-binlog-analyzer). ' + + 'This "dotutils" version is deprecated and will no longer be updated.', + install, details, dismiss); + + if (choice === install) { + await vscode.commands.executeCommand('workbench.extensions.installExtension', NEW_EXTENSION_ID); + const uninstall = 'Uninstall old & reload'; + const later = 'Later'; + const next = await vscode.window.showInformationMessage( + 'The official extension is installed. Uninstall this deprecated version and reload to finish migrating?', + uninstall, later); + if (next === uninstall) { + await vscode.commands.executeCommand('workbench.extensions.uninstallExtension', OLD_EXTENSION_ID); + await vscode.commands.executeCommand('workbench.action.reloadWindow'); + } + } else if (choice === details) { + await vscode.env.openExternal(vscode.Uri.parse( + 'https://marketplace.visualstudio.com/items?itemName=' + NEW_EXTENSION_ID)); + } else if (choice === dismiss) { + await context.globalState.update(DISMISS_KEY, true); + } + } catch { + // Non-fatal — never block activation on the migration notice. + } +} diff --git a/src/extension.ts b/src/extension.ts index 6644c1b..d5271ba 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -12,6 +12,7 @@ import { } from './buildCheck'; import * as telemetry from './telemetry'; import { registerBinlogLanguageModelTools } from './languageModelTools'; +import { showDeprecationNotice } from './deprecationNotice'; import { projectSourcesAccessible, formatOverviewText } from './parsers'; import * as path from 'path'; import * as fs from 'fs'; @@ -172,6 +173,10 @@ export async function activate(context: vscode.ExtensionContext) { telemetry.trackActivation(); setCiContext(context); + // This extension is deprecated in favor of the official ms-dotnettools + // extension. Nudge users to migrate (best-effort, never blocks activation). + void showDeprecationNotice(context); + // Expose binlog analysis as VS Code language-model tools so any agent // (@workspace, custom modes, agent mode) can use them — not just @binlog. registerBinlogLanguageModelTools(context, { From f4d6b4a9bb29ed1ba5e885373c5101c6a9053bd3 Mon Sep 17 00:00:00 2001 From: Yuliia Kovalova Date: Fri, 24 Jul 2026 14:07:42 +0200 Subject: [PATCH 2/2] Harden migration nudge: one-time modal + persistent status bar A single transient toast is too easy to dismiss, so most users would never migrate. Replace it with two harder-to-miss layers (still best-effort, never blocks activation): - One-time blocking modal (tracked in globalState). Escape/Cancel only defers it to the next activation; it is never treated as a permanent dismissal. - Persistent amber status-bar item ("Binlog Analyzer deprecated") that remains every session until the user migrates or opts out, and re-opens the migration prompt on click. "Install new extension" installs ms-dotnettools.msbuild-binlog-analyzer, hides the status bar, and offers to uninstall this build and reload. "Don't show again" suppresses both layers. Everything goes silent once the official extension is installed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 270764ca-be14-46fc-a3b4-3361dd725c25 --- CHANGELOG.md | 2 +- src/deprecationNotice.ts | 90 +++++++++++++++++++++++++++------------- src/extension.ts | 7 ++-- 3 files changed, 66 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62ed2f5..6de0e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 0.10.28 (Preview) ### Deprecated -- **This extension has moved to the official Microsoft extension** — `dotutils.binlog-analyzer` is now published as [`ms-dotnettools.msbuild-binlog-analyzer`](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.msbuild-binlog-analyzer) ("MSBuild Binlog Analyzer for VS Code"). This `dotutils` build is deprecated and will no longer be updated. On activation it now offers to install the official extension and uninstall this one; the README and Marketplace listing point to the replacement. +- **This extension has moved to the official Microsoft extension** — `dotutils.binlog-analyzer` is now published as [`ms-dotnettools.msbuild-binlog-analyzer`](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.msbuild-binlog-analyzer) ("MSBuild Binlog Analyzer for VS Code"). This `dotutils` build is deprecated and will no longer be updated. It now nudges users to migrate with a one-time blocking dialog (offering to install the official extension and uninstall this one) plus a persistent status-bar warning that remains until you migrate or opt out; the notice stays silent once the official extension is installed. The README and Marketplace listing point to the replacement. ## 0.10.27 (Preview) diff --git a/src/deprecationNotice.ts b/src/deprecationNotice.ts index 3b5ff8d..7fed2de 100644 --- a/src/deprecationNotice.ts +++ b/src/deprecationNotice.ts @@ -2,49 +2,81 @@ import * as vscode from 'vscode'; /** * This "dotutils" extension is deprecated in favor of the official Microsoft - * extension. On activation we nudge the user to install the replacement and - * (optionally) uninstall this one. The prompt is best-effort and must never - * block or break activation. + * extension. A single transient toast is too easy to dismiss, so we use two + * layers that are hard to miss but not obnoxious: + * 1. A blocking modal shown exactly once (Escape/Cancel only defers it to the + * next activation — it is never treated as a permanent dismissal). + * 2. A persistent status-bar warning that stays until the user migrates or + * explicitly opts out, and re-opens the migration prompt on click. + * Everything is best-effort and must never block or break activation. */ const NEW_EXTENSION_ID = 'ms-dotnettools.msbuild-binlog-analyzer'; const OLD_EXTENSION_ID = 'dotutils.binlog-analyzer'; -const DISMISS_KEY = 'binlog.deprecationNoticeDismissed'; +const MIGRATE_COMMAND = 'binlog.showDeprecationMigration'; +const SUPPRESS_KEY = 'binlog.deprecationNoticeSuppressed'; +const MODAL_SHOWN_KEY = 'binlog.deprecationModalShown'; -export async function showDeprecationNotice(context: vscode.ExtensionContext): Promise { +export function registerDeprecationNotice(context: vscode.ExtensionContext): void { try { // Already migrated — the official extension is installed, so stay quiet. if (vscode.extensions.getExtension(NEW_EXTENSION_ID)) { return; } - if (context.globalState.get(DISMISS_KEY)) { + if (context.globalState.get(SUPPRESS_KEY)) { return; } - const install = 'Install new extension'; - const details = 'What changed'; - const dismiss = "Don't show again"; - const choice = await vscode.window.showWarningMessage( - 'MSBuild Binlog Analyzer has moved to the official Microsoft extension ' + - '"MSBuild Binlog Analyzer for VS Code" (ms-dotnettools.msbuild-binlog-analyzer). ' + - 'This "dotutils" version is deprecated and will no longer be updated.', - install, details, dismiss); + // Persistent, always-visible reminder that survives dismissing the dialog. + const status = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, -100); + status.text = '$(warning) Binlog Analyzer deprecated'; + status.tooltip = 'This extension has moved to ms-dotnettools.msbuild-binlog-analyzer. Click to migrate.'; + status.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground'); + status.command = MIGRATE_COMMAND; + status.show(); + context.subscriptions.push(status); - if (choice === install) { - await vscode.commands.executeCommand('workbench.extensions.installExtension', NEW_EXTENSION_ID); - const uninstall = 'Uninstall old & reload'; - const later = 'Later'; - const next = await vscode.window.showInformationMessage( - 'The official extension is installed. Uninstall this deprecated version and reload to finish migrating?', - uninstall, later); - if (next === uninstall) { - await vscode.commands.executeCommand('workbench.extensions.uninstallExtension', OLD_EXTENSION_ID); - await vscode.commands.executeCommand('workbench.action.reloadWindow'); + const migrate = async (modal: boolean): Promise => { + try { + const install = 'Install new extension'; + const dismiss = "Don't show again"; + const choice = await vscode.window.showWarningMessage( + 'MSBuild Binlog Analyzer has moved to the official Microsoft extension ' + + '"MSBuild Binlog Analyzer for VS Code" (ms-dotnettools.msbuild-binlog-analyzer). ' + + 'This "dotutils" version is deprecated and will no longer be updated. ' + + 'Please install the official extension to keep getting updates.', + { modal }, + install, dismiss); + + if (choice === install) { + await vscode.commands.executeCommand('workbench.extensions.installExtension', NEW_EXTENSION_ID); + status.hide(); + const uninstall = 'Uninstall old & reload'; + const next = await vscode.window.showInformationMessage( + 'The official extension is installed. Uninstall this deprecated version and reload to finish migrating?', + uninstall, 'Later'); + if (next === uninstall) { + await vscode.commands.executeCommand('workbench.extensions.uninstallExtension', OLD_EXTENSION_ID); + await vscode.commands.executeCommand('workbench.action.reloadWindow'); + } + } else if (choice === dismiss) { + await context.globalState.update(SUPPRESS_KEY, true); + status.hide(); + } + // choice === undefined (Escape/Cancel) or "Later": leave the status + // bar in place and re-prompt on a future activation. + } catch { + // Non-fatal. } - } else if (choice === details) { - await vscode.env.openExternal(vscode.Uri.parse( - 'https://marketplace.visualstudio.com/items?itemName=' + NEW_EXTENSION_ID)); - } else if (choice === dismiss) { - await context.globalState.update(DISMISS_KEY, true); + }; + + context.subscriptions.push( + vscode.commands.registerCommand(MIGRATE_COMMAND, () => migrate(false)) + ); + + // Show the unmissable modal exactly once; the status bar covers later sessions. + if (!context.globalState.get(MODAL_SHOWN_KEY)) { + void context.globalState.update(MODAL_SHOWN_KEY, true); + void migrate(true); } } catch { // Non-fatal — never block activation on the migration notice. diff --git a/src/extension.ts b/src/extension.ts index d5271ba..a02316c 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -12,7 +12,7 @@ import { } from './buildCheck'; import * as telemetry from './telemetry'; import { registerBinlogLanguageModelTools } from './languageModelTools'; -import { showDeprecationNotice } from './deprecationNotice'; +import { registerDeprecationNotice } from './deprecationNotice'; import { projectSourcesAccessible, formatOverviewText } from './parsers'; import * as path from 'path'; import * as fs from 'fs'; @@ -174,8 +174,9 @@ export async function activate(context: vscode.ExtensionContext) { setCiContext(context); // This extension is deprecated in favor of the official ms-dotnettools - // extension. Nudge users to migrate (best-effort, never blocks activation). - void showDeprecationNotice(context); + // extension. Register a persistent migration nudge (best-effort, never + // blocks activation): an unmissable modal once + a persistent status bar. + registerDeprecationNotice(context); // Expose binlog analysis as VS Code language-model tools so any agent // (@workspace, custom modes, agent mode) can use them — not just @binlog.