Skip to content

Fix "No Packages Found" in PM UI when there are vulnerable packages - #7708

Merged
donnie-msft merged 1 commit into
devfrom
dev-donnie-msft-noPackagesFoundBug
Sep 16, 2026
Merged

donnie-msft merged 1 commit into
devfrom
dev-donnie-msft-noPackagesFoundBug

Conversation

@donnie-msft

@donnie-msft donnie-msft commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Bug

Fixes: NuGet/Home#14648

Description

When pressing "Manage NuGet Packages" from the Solution Explorer vulnerabilities infobar, a race occurs where "No packages found" was being show immediately, followed by the loading of vulnerable packages. Nothing reset the indication that none were initially found, so it remained visible.

With this change, the loading indicator appears:

image

...then the list of vulnerable packages is shown without "no packages found" incorrectly remaining visible at the top:

image

Fix details

  1. The shortcut selects Installed, starting package loading.
  2. It immediately enables Show only vulnerable.
  3. Installed packages enter the list before their vulnerability metadata is ready, so  IsPackageVulnerable  initially returns  false .
  4. Load completion sees zero vulnerable packages and sets the separate indicator to NoItemsFound.
  5. Vulnerability hydration completes and raises  PropertyChanged(IsPackageVulnerable) .
  6. WPF live filtering then reveals the vulnerable package—but previously nothing removed or refreshed the separate “No packages found” indicator.

The fix handles step 5 by removing that stale indicator when a package currently in the list becomes vulnerable.

The shortcut makes the race much more likely because it applies the tab and vulnerability filter immediately during initial loading. Manually selecting the checkbox usually happens after vulnerability metadata has already arrived, although the older issues confirm it can also occur manually under the right timing.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@donnie-msft
donnie-msft requested a review from a team as a code owner September 15, 2026 15:44
@donnie-msft
donnie-msft merged commit c3dfa23 into dev Sep 16, 2026
18 checks passed
@donnie-msft
donnie-msft deleted the dev-donnie-msft-noPackagesFoundBug branch September 16, 2026 21:26
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.

Clicking the ‘Manage NuGet Packages’ link in the Solution Explorer window will show both the ‘no packages found’ and vulnerable packages

4 participants