Repository navigation
Coordinate Project Nominations to prevent endless refresh loop in PM UI - #7685
Merged
Merged
Conversation
donnie-msft
force-pushed
the
dev-donnie-msft-pmuiNominations
branch
from
September 4, 2026 00:24
5e31ea3 to
e9a994b
Compare
donnie-msft
marked this pull request as ready for review
September 4, 2026 00:25
jebriede
reviewed
Sep 4, 2026
jebriede
left a comment
Contributor
There was a problem hiding this comment.
Looks good! One change requested to ensure CTS disposal.
nkolev92
reviewed
Sep 10, 2026
nkolev92
left a comment
Member
There was a problem hiding this comment.
Don't batch the nominations. Just do it one by one. More perf efficient and it much shorter code.
jebriede
previously approved these changes
Sep 11, 2026
donnie-msft
force-pushed
the
dev-donnie-msft-pmuiNominations
branch
from
September 14, 2026 19:05
e9a994b to
3260834
Compare
Nigusu-Allehu
previously approved these changes
Sep 15, 2026
nkolev92
reviewed
Sep 15, 2026
donnie-msft
force-pushed
the
dev-donnie-msft-pmuiNominations
branch
from
September 16, 2026 19:36
d040d5e to
3d44fdf
Compare
zivkan
reviewed
Sep 17, 2026
donnie-msft
force-pushed
the
dev-donnie-msft-pmuiNominations
branch
from
September 17, 2026 17:00
16904d7 to
c8cb4d1
Compare
nkolev92
approved these changes
Sep 17, 2026
zivkan
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes: NuGet/Home#15072
Developer Community ticket https://developercommunity.visualstudio.com/t/Manage-Nuget-Packages-for-Solution-crash/11032673
Description
Fixes an endless Package Manager UI refresh loop when updating a package across many projects in a solution that uses Central Package Management (CPM).
Record the stopwatch duration while waiting on nominations and emit in telemetry so we can understand how often this fix is used to address the problem, and to what extent.
Problem
The PM UI refreshes in response to project nominations.
With CPM, the rate of these nominations is much higher as a shared file (
Directory.Packages.props) is updated.Project System renominates every project.
In my testing this resulted in 2 minutes of "Loading..." refreshing (at which point I closed VS) and it "flickered" repeatedly during that time.
That indicates PM UI was responding to the event and starting a new "refresh" repeatedly.
Copilot calls the cycle of "Operation canceled by user" / "Loading..." flickering a "refresh storm".
Fix
Before refreshing, wait for the in-flight project nominations to settle.
ProjectNominationCoordinatormirrorsSolutionRestoreWorker's bulk-restore coordinationIVsProjectRestoreInfoSource.WhenNominatedfor any source reportingHasPendingNominationRestore's bulk-restore
This fix is inspired by Restore's bulk-restore.
Before a bulk restore,
SolutionRestoreWorkerwaits for all projects with pending nominations to finish (HasPendingNomination/WhenNominated)It's bounded by a 5-minute
BulkRestoreCoordinationTimeoutso a crashed/stuck project system can't hang it.On timeout, it proceeds with whatever was nominated.
ProjectNominationCoordinatoruses the same signal and the same 5-minute timeout at the PM UI, with the same graceful degradation.Validation
New unit tests for
ProjectNominationCoordinatortests the ability to settle, timeout, progress guards, project-scoped wait, and the effect of cancellation.Manual end-to-end repro on OrchardCore (large CPM solution), updating
Microsoft.Extensions.Azurefrom 1.14.0 to 1.14.1 across 9 projects:Results with large CPM solution (OrchardCore)
PR Checklist
Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.