Skip to content

Do not block F# package loading on the Unified Settings refresh - #20998

Merged
abonie merged 3 commits into
dotnet:mainfrom
xperiandri:fix/unified-settings-migration-deadlock
Nov 20, 2026
Merged

abonie merged 3 commits into
dotnet:mainfrom
xperiandri:fix/unified-settings-migration-deadlock

Conversation

@xperiandri

Copy link
Copy Markdown
Contributor

Fixes #20996

Visual Studio no longer hangs at solution load when it loads the F# package synchronously before Unified Settings finishes its refresh. Package initialization waited for the one-time import of legacy settings, the import waits for that refresh, and the refresh needs the UI thread the package load blocks; the import now runs as a JoinableTask of the package and completes after the refresh.

Details
  • A setting read once at startup that requires a restart (solution background analysis, for example) picks up a late first-run import after the next restart; settings read live get it through their change subscriptions.
  • startAsync became the synchronous start, so most of that file's diff is indentation; review with whitespace hidden.
  • Reproduced in an experimental hive by opening a ~130-project solution: main hangs on every open.

🤖 Generated with Claude Code

Package initialization awaited the one-time import of legacy settings, and
the import first waits for IUnifiedSettingsMetadata.WaitForRefreshAsync.
When Visual Studio loads the F# package synchronously on the UI thread
before Unified Settings has loaded its observer packages, the refresh waits
for that blocked UI thread and Visual Studio hangs.

Start the import as a JoinableTask of the package instead. The package
loads at once, the import runs when the refresh completes, and package
disposal still joins it. The roaming retry uses the same factory.

Fixes dotnet#20996

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Release-note check exempted

The NO_RELEASE_NOTES label or localization-bot authorship exempts this pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing key with DoesNotContain

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Nov 19, 2026
@abonie abonie added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Nov 19, 2026
@abonie
abonie merged commit e466501 into dotnet:main Nov 20, 2026
56 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in F# Compiler and Tooling Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Visual Studio deadlocks on solution load: FSharpPackage initialization awaits Unified Settings WaitForRefreshAsync

2 participants