Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The transitive package doesn’t show in “Installed” tab until reopening the solution #12102

Closed
v-longmin opened this issue Sep 20, 2022 · 6 comments · Fixed by NuGet/NuGet.Client#4824

Comments

@v-longmin
Copy link

NuGet Product Used

Visual Studio Package Management UI

Product Version

NuGet Client Dev\6.4.0.92

Worked before?

No response

Impact

It bothers me. A fix would be nice

Repro Steps & Context

Repro steps:

  1. Set the environment Variable NUGET_TRANSITIVE_DEPENDENCIES_IN_PMUI=1.
  2. Create a new C# Console App (.Net Core) project.
  3. Right-click the project in Solution Explorer and select ‘Manage NuGet Packages…’ menu item to open PM UI.
  4. Click “Browse” tab, search a package (e.g. “Microsoft.EntityFrameworkCore”) that has dependencies, select a package version [6.0.4] in the "Version" drop-down list in the right panel and click the “Install” button on the right.
  5. Switch to “Installed” tab.

Expected:

The transitive package should show in “Installed” tab.

Actual:

The transitive package doesn’t show in “Installed” tab as below screenshot.
image

Notes:

  1. The transitive package can be show in “Installed” tab after closing solution/VS and reopening the same solution.
  2. The issue starts from NuGet Client Dev\6.4.0.90.

Verbose Logs

No response

@donnie-msft
Copy link
Contributor

@v-longmin do you get the desired behavior if you choose File -> Save All after the Install completes, but before opening the Installed tab?

@jebriede may be able to speak to the caching strategy used for this feature. I would guess that what's happening is the assets file isn't being re-generated, and the UI is reading/showing stale data from the previous restore.

@dominoFire
Copy link
Contributor

I can repro the bug on latest VS with NuGet 6.4.0.90; investigating.

@dominoFire dominoFire self-assigned this Sep 20, 2022
@dominoFire
Copy link
Contributor

When a package is installed, this should invalidate inner cache in PackageReferenceProject and, then, repopulate them.

@dominoFire
Copy link
Contributor

There seems to be a race condition when we re-read the assets file and when the assets file is restored with updated info.

@dominoFire
Copy link
Contributor

@dominoFire dominoFire added Priority:2 Issues for the current backlog. and removed Triage:NeedsTriageDiscussion labels Sep 20, 2022
@v-longmin
Copy link
Author

@dominoFire It doesn't work after choosing file -> save all after the install completes.

dominoFire pushed a commit to NuGet/NuGet.Client that referenced this issue Sep 29, 2022
…nsitivePackagesAsync API (#4824)

Fixes NuGet/Home#12102

Adds condition to get transitive origins when we have transitive packages but no transitive origins

Co-authored-by: Erick Yondon <eryondon@microsoft.com>
@erdembayar erdembayar added this to the 6.4 milestone Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment