[Bug Bash] The package source will switch to ‘nuget.org’ automatically after installing a "PackageReference" package from a source other than ‘nuget.org’ in a non-SDK style project #14152
Labels
Area:Settings
NuGet.Config and related issues
Found:ManualTests
Functionality:Install
The install command in VS/nuget.exe
Functionality:VisualStudioUI
Package Manager UI et al
Priority:2
Issues for the current backlog.
Product:VS.Client
Type:Bug
NuGet Product Used
Visual Studio Package Management UI
Product Version
NuGet Client Dev\6.14.0.49
Worked before?
It is a regression since the issue reproes on D17.13\35825.156 with implicit NuGet 6.13.2.1, but doesn't repro on D16.11\35818.1 with implicit NuGet 5.11.6.4.
Impact
It bothers me. A fix would be nice
Notes:
The repro rate is 100%.
It doesn’t repro when installing the package with “Packages.config” format.
It doesn't repro when the package is first installed using the "PackageReference" format.
The issue only repro when the package is first installed using the "packages.config" format and then uninstalled and reinstalled using the "PackageReference" format.
Repro Steps & Context
Create a C# Console App project (.NET Framework 4.8.1).
Open Package Manager Settings dialog through menu Tools->NuGet Package Manager->Package Manager Settings.
Click the Package Sources tab, and add a custom feed source, type in the name is “Myget” and the package source is
https://www.myget.org/F/andy-nuget-project/api/v2
.Check the “nuget.org” in Settings->NuGet Package Manager->Package Sources.
Check the “Prompt for format selection on first package install”, select “Packages.config” in the “Default package management format” drop-down list and click OK button.
Go back to PM UI -> Select the package source: “Myget” near the gear button.
In the “Browse” tab, select a package and click the “Install” button.
After that, click the “Uninstall” button and click the “Install” button to install the package with “PackageReference” format.
Observe the package source dropdown box.
Expected:
The package source should be consistent with the one when installing the package.
Actual:
After installing the package with “Package Reference” format, the package source will switch to different one as the record below.
Verbose Logs
The text was updated successfully, but these errors were encountered: