Skip to content

[Bug Bash][Unstable] The machine-wide package source in the ‘Package source’ dropdown list was truncated and the package source ‘nuget.org’ disappeared after the machine-wide package is disabled and then enabled back #14700

@v-luzh

Description

@v-luzh

NuGet Product Used

Visual Studio Package Management UI

Product Version

VS Main/11322.50 + NuGet Client Dev/7.3.0.48

Worked before?

It is a regression since it reproes on D18.0\11304.174 (Unified Settings ‘Options’ dialog), but doesn’t repro on D16.11\36711.23 (the old ‘Options’ dialog).

Impact

It bothers me. A fix would be nice

Repro Steps & Context

Note:

  1. Repro rate: 80%.
  2. It will not repro again after closing VS and reloading the solution.

Repro Steps:

  1. Create a C# Console App (.NET 10.0) in VS and open the project-level PM UI.
  2. Make sure you have several package sources in ‘nuget.config’ file under the path ‘C:\Users[UserName]\AppData\Roaming\NuGet’ (as the lines below).
    key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3"
    key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\"
  1. Click the menu ‘Tools->Options->NuGet Package Manager->Package Source’ and delete all the package sources.
  2. Close the VS, reload the solution (to avoid meeting the bug 14693), click ‘Tools->Options->NuGet Package Manager->Package Source’ and add several package sources (a local package source & nuget.org in this instance).
  3. Select a package source (for example: the local path which already have some packages) in the ‘Package source’ dropdown list and install a package.
  4. Click ‘Tools->Options->NuGet Package Manager->Package Source’ and make sure the machine-wide package source disabled.
  5. Enable the machine-wide package source again, go to the PM UI and update the installed package to another version.
  6. Expand the ‘Package source’ dropdown list and observe.

Expected Result:

All the enabled sources show correctly in the ‘Package source’ dropdown list.

Actual Result:

The machine-wide package source in the ‘Package source’ dropdown list was truncated and the package source ‘nuget.org’ disappeared as the recording (it was started from step6) below.
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions