Create a C# Console App (.Net core) project in VS.
Right-click the project in Solution Explorer and select "Manage NuGet Packages…" menu item to open PM UI.
Click settings button (top-right of right panel), only check the newly added deprecated package source (source 1) & "Microsoft Visual Studio Offline Packages" package source (source 2) and uncheck the other package sources.
Select the "Microsoft Visual Studio Offline Packages" package source (source 2) from “Package source” dropdown list, go to "Browse" tab and click a package (for example "Newtonsoft.Json").
Clear the "Version" drop-down box in the right panel.
Type a floating version “*” in the “Version” drop-down box and click the “Install” button.
Expected:
The installed package is the latest version 4.0.1 of the selected package source (source 2).
Actual:
The installed package is not the latest version of the selected package source (it installed the latest version 4.7.0 from the unselected package source-source 1) when installing a package with floating version “*”as below screenshot:
NuGet Product Used
Visual Studio Package Management UI
Product Version
NuGet Client Dev\6.7.0.45
Worked before?
No response
Impact
It bothers me. A fix would be nice
Repro Steps & Context
Repro Steps:
Add a deprecated package source https://apidev.nugettest.org/v3-index/index.json (source 1).
Create a C# Console App (.Net core) project in VS.
Right-click the project in Solution Explorer and select "Manage NuGet Packages…" menu item to open PM UI.
Click settings button (top-right of right panel), only check the newly added deprecated package source (source 1) & "Microsoft Visual Studio Offline Packages" package source (source 2) and uncheck the other package sources.
Select the "Microsoft Visual Studio Offline Packages" package source (source 2) from “Package source” dropdown list, go to "Browse" tab and click a package (for example "Newtonsoft.Json").
Clear the "Version" drop-down box in the right panel.
Type a floating version “*” in the “Version” drop-down box and click the “Install” button.
Expected:
The installed package is the latest version 4.0.1 of the selected package source (source 2).
Actual:
The installed package is not the latest version of the selected package source (it installed the latest version 4.7.0 from the unselected package source-source 1) when installing a package with floating version “*”as below screenshot:
Notes:
The repro rate is 100%.
It repro on D17.5\33530.505.d17.5 + Dev\6.0.5.154
Verbose Logs
No response