Skip to content

[Bug Bash] The machine-wide package source should be shown immediately under the ‘Package Sources’ part after deleting all the package sources from ‘Options->NuGet Package Manager->Package Sources’ #14693

@v-luzh

Description

@v-luzh

NuGet Product Used

Visual Studio Package Management UI

Product Version

VS Main/11317.58 + NuGet Client Dev/7.3.0.48

Worked before?

It is not a regression since it also reproes on VS D18.0\11304.174.

Impact

None

Repro Steps & Context

Note:

  1. Repro rate: 100%.

Repro Steps:

  1. Create a C# Console App (.NET Framework) in VS.
  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"
         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 Mapping’ and add a package pattern ‘Microsoft.*’ with source ‘nuget.org’.
  2. Delete all the package sources and observe the whole page under ‘Options->NuGet Package Manager’.

Expected Result:

The machine-wide package source should be shown immediately under the ‘Package Sources’ part.

Actual Result:

No machine-wide package source shows under the ‘Package Sources’ part however the error in ‘Options->NuGet Package Manager->Package Source Mapping’ said there is. Please see the attached record (it was start to record after the step4).

Image

Verbose Logs

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