Skip to content

Disable VS Code extension auto-restore by default#16658

Merged
adamint merged 1 commit intomicrosoft:mainfrom
adamint:dev/adamint/issue16338-disable-auto-restore-default
May 1, 2026
Merged

Disable VS Code extension auto-restore by default#16658
adamint merged 1 commit intomicrosoft:mainfrom
adamint:dev/adamint/issue16338-disable-auto-restore-default

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented May 1, 2026

Description

Changes the default value of the aspire.enableAutoRestore VS Code extension setting from true to false. The extension will no longer automatically run aspire restore when the workspace opens or when aspire.config.json changes. Users who want this behavior can opt in via the setting.

Fixes #16338

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Changes the default value of the `aspire.enableAutoRestore` setting
from `true` to `false` so the VS Code extension no longer runs
`aspire restore` automatically. Users who want auto-restore can
opt in via the setting.

Fixes microsoft#16338

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 1, 2026 18:18
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16658

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16658"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the Aspire VS Code extension’s default behavior so it no longer automatically runs aspire restore on workspace open or when aspire.config.json changes, requiring users to explicitly opt in via the aspire.enableAutoRestore setting. This aligns the runtime default in code with the contributed configuration default, and mitigates restore/locked-file conflicts like those reported in #16338.

Changes:

  • Flip the default fallback value for getEnableAutoRestore() from true to false.
  • Update the VS Code contributed setting aspire.enableAutoRestore default from true to false.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
extension/src/utils/settings.ts Changes the code-level default fallback for enableAutoRestore to false.
extension/package.json Updates the VS Code setting contribution default for aspire.enableAutoRestore to false.

@adamint adamint merged commit f114b8f into microsoft:main May 1, 2026
566 of 572 checks passed
@github-actions github-actions Bot added this to the 13.4 milestone May 1, 2026
@adamint
Copy link
Copy Markdown
Member Author

adamint commented May 1, 2026

/backport to release/13.3

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Started backporting to release/13.3 (link to workflow run)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code Extension: aspire restore failed

3 participants