NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 252 forks source link

[Bug Bash] Deprecated icon shows in the “Browse”/”Updates” tab on the left of a non-deprecated version #12612

Open v-luzh opened 1 year ago

v-luzh commented 1 year ago

NuGet Product Used

Visual Studio Package Management UI

Product Version

Dev\6.7.0.48

Worked before?

No response

Impact

It bothers me. A fix would be nice

Repro Steps & Context

Repro Steps:

  1. Open VS and create a C# ASP.NET Core (7.0) Web Application.
  2. Right-click the project in Solution Explorer and select “Manage NuGet Packages…” menu item to open PM UI.
  3. Click “Browse” tab and select the “nuget.org” from Package source drop-down list.
  4. Search the package “Microsoft.NETCore.Targets” in the filter, select version “3.0.0” (not a deprecated version) and click “Install” button.
  5. Don’t clear the filter and go to “Browse”/”Updates” tab.

Expected:

The deprecated icon should only show in “Installed” tab (would not show in “Browse”/”Updates” tab) and it should show on the left of a real deprecated version.

Actual:

The deprecated icon showed in “Browse”/”Updates” tab (not show in the “Installed” tab) and it showed on the left of a non-deprecated version as below. image

Notes:

It reproes on D17.5\33530.505.

Verbose Logs

No response

martinrrm commented 1 year ago

I can repro it, the bug is that if you install a version that is NOT deprecated but the latest version of the package IS deprecated, we will display a Warning even if the installed version is not.

We can change the warning to be next to the Latest Version so it's clear which version in the deprecated one, but this is relevant to Browse and Updates tab.

Or we can change the warning text to specify which version is the deprecated.

image

@donnie-msft Do you have another idea for this? I can work on this next sprint since I'm working in vulnerabilities

donnie-msft commented 1 year ago

This appears to be a behavior change due to Search now including the latest package's deprecation metadata.

the bug is that if you install a version that is NOT deprecated but the latest version of the package IS deprecated, we will display a Warning even if the installed version is not.

This is spot on. If I disable showing prerelease versions, the warning icon goes away. image

We can change the warning to be next to the Latest Version Or we can change the warning text to specify which version is the deprecated.

Doing both would be awesome!

donnie-msft commented 1 year ago

Related issue on developer community: https://developercommunity.visualstudio.com/t/NuGet-Packages---Deprecation-information/10483332

CiciLi1 commented 2 months ago

It still reproes on VS Main\35222.175 + NuGet Client Dev\6.12.0.82.