Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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. 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)

### Added
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
84 changes: 84 additions & 0 deletions src/deprecationNotice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import * as vscode from 'vscode';

/**
* This "dotutils" extension is deprecated in favor of the official Microsoft
* 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 MIGRATE_COMMAND = 'binlog.showDeprecationMigration';
const SUPPRESS_KEY = 'binlog.deprecationNoticeSuppressed';
const MODAL_SHOWN_KEY = 'binlog.deprecationModalShown';

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<boolean>(SUPPRESS_KEY)) {
return;
}

// 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);

const migrate = async (modal: boolean): Promise<void> => {
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.
}
};

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<boolean>(MODAL_SHOWN_KEY)) {
void context.globalState.update(MODAL_SHOWN_KEY, true);
void migrate(true);
}
} catch {
// Non-fatal — never block activation on the migration notice.
}
}
6 changes: 6 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from './buildCheck';
import * as telemetry from './telemetry';
import { registerBinlogLanguageModelTools } from './languageModelTools';
import { registerDeprecationNotice } from './deprecationNotice';
import { projectSourcesAccessible, formatOverviewText } from './parsers';
import * as path from 'path';
import * as fs from 'fs';
Expand Down Expand Up @@ -172,6 +173,11 @@ export async function activate(context: vscode.ExtensionContext) {
telemetry.trackActivation();
setCiContext(context);

// This extension is deprecated in favor of the official ms-dotnettools
// 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.
registerBinlogLanguageModelTools(context, {
Expand Down
Loading