[Bug Bash] The Sources Order In ‘Package Source Mappings’ Tab Is Inconsistent With ‘Package Source’ Tab When They Were Added Separately

by ADMIN 136 views

Bug Bash: The Sources Order in ‘Package Source Mappings’ Tab is Inconsistent with ‘Package Source’ Tab When They Were Added Separately

In this article, we will be discussing a bug in the Visual Studio Package Management UI, specifically in the NuGet Client 6.15.0.17 version. The issue is related to the order of package sources in the ‘Package Source Mappings’ tab, which is inconsistent with the order shown in the ‘Package Sources’ tab when the package sources were added separately. This bug has been identified and reported, and in this article, we will provide a detailed explanation of the issue, including the repro steps, expected behavior, and actual behavior.

The NuGet product used in this bug is the Visual Studio Package Management UI.

The product version used in this bug is NuGet Client 6.15.0.17.

This is not a regression since the issue reproduces on D17.13\36008.115 with implicit NuGet 6.13.2.1 and the feature is not supported on D16.11\35912.113 with implicit NuGet 5.11.6.4.

This bug may cause inconvenience to users who rely on the correct order of package sources in the ‘Package Source Mappings’ tab. A fix would be nice to resolve this issue.

To reproduce this bug, follow these steps:

  1. Create a C# Console App (.NET 9.0) project in VS: Open Visual Studio and create a new C# Console App project with the target framework set to .NET 9.0.
  2. Open the PM UI or PMC window: Open the Package Manager UI (PM UI) or Package Manager Console (PMC) window.
  3. Click the settings button (gear button) on PM UI or PMC window: Click the settings button (gear button) on the PM UI or PMC window to open the Options window.
  4. Click the NuGet Package Manager->Package Source Mapping in the opened “Options” window: In the Options window, click on NuGet Package Manager and then select Package Source Mapping.
  5. Ensure that there are at least three package sources listed: Ensure that there are at least three package sources listed in the Package Source Mapping window.
  6. Click the “Add” button in the “Add New Package Source Mapping” dialog: Click the “Add” button in the Add New Package Source Mapping dialog to add a new package source mapping.
  7. Type the package pattern “a” in the “Package pattern:” textbox: Type the package pattern “a” in the Package pattern: textbox.
  8. Select source in order “1” and “3” and then click “Add” button: Select source in order “1” and “3” and then click the “Add” button.
  9. Add another new package source mapping with the same name “a”: Add another new package source mapping with the same name “a”.
  10. Select source in order 2 and click “Add” button: Select source in order 2 and click the “Add” button.
  11. Click “OK” button and reopenPackage Source Mapping” in option windows: Click the “OK” button and reopen the Package Source Mapping window in the Options window.

The order of package sources in the “Package Source Mapping” tab should match the order shown in the “Package Sources” tab.

The order of package sources in the “Package Source Mapping” tab doesn’t match the order shown in the “Package Sources” tab.

// No verbose logs are available for this issue.

In conclusion, the bug in the Visual Studio Package Management UI, specifically in the NuGet Client 6.15.0.17 version, is related to the order of package sources in the ‘Package Source Mappings’ tab, which is inconsistent with the order shown in the ‘Package Sources’ tab when the package sources were added separately. This bug has been identified and reported, and a fix would be nice to resolve this issue.
Bug Bash: The Sources Order in ‘Package Source Mappings’ Tab is Inconsistent with ‘Package Source’ Tab When They Were Added Separately - Q&A

In our previous article, we discussed a bug in the Visual Studio Package Management UI, specifically in the NuGet Client 6.15.0.17 version. The issue is related to the order of package sources in the ‘Package Source Mappings’ tab, which is inconsistent with the order shown in the ‘Package Sources’ tab when the package sources were added separately. In this article, we will provide a Q&A section to address some of the frequently asked questions related to this issue.

A: This bug may cause inconvenience to users who rely on the correct order of package sources in the ‘Package Source Mappings’ tab. A fix would be nice to resolve this issue.

A: No, this is not a regression since the issue reproduces on D17.13\36008.115 with implicit NuGet 6.13.2.1 and the feature is not supported on D16.11\35912.113 with implicit NuGet 5.11.6.4.

A: To reproduce this bug, follow these steps:

  1. Create a C# Console App (.NET 9.0) project in VS.
  2. Open the PM UI or PMC window.
  3. Click the settings button (gear button) on PM UI or PMC window.
  4. Click the NuGet Package Manager->Package Source Mapping in the opened “Options” window.
  5. Ensure that there are at least three package sources listed.
  6. Click the “Add” button in the “Add New Package Source Mapping” dialog.
  7. Type the package pattern “a” in the “Package pattern:” textbox.
  8. Select source in order “1” and “3” and then click “Add” button.
  9. Add another new package source mapping with the same name “a”.
  10. Select source in order 2 and click “Add” button.
  11. Click “OK” button and reopen the Package Source Mapping window in the Options window.

A: The order of package sources in the “Package Source Mapping” tab should match the order shown in the “Package Sources” tab.

A: The order of package sources in the “Package Source Mapping” tab doesn’t match the order shown in the “Package Sources” tab.

A: No, there are no verbose logs available for this issue.

A: Yes, you can report this issue to the Visual Studio team. Please provide as much detail as possible, including the repro steps and any relevant logs.

In conclusion, the bug in the Visual Studio Package Management UI, specifically in the NuGet Client 6.15.0.17 version, is related to the order of package sources in the ‘Package Source Mappings’ tab, which is inconsistent the order shown in the ‘Package Sources’ tab when the package sources were added separately. We hope that this Q&A section has provided some helpful information and answers to your questions. If you have any further questions or concerns, please don’t hesitate to reach out.