Fix GivenDotnetPackageAdd test failures with package source mapping for Central Package Management#52440
Closed
Copilot wants to merge 2 commits intorelease/10.0.1xxfrom
Closed
Fix GivenDotnetPackageAdd test failures with package source mapping for Central Package Management#52440Copilot wants to merge 2 commits intorelease/10.0.1xxfrom
Copilot wants to merge 2 commits intorelease/10.0.1xxfrom
Conversation
… source mapping Co-authored-by: nagilson <23152278+nagilson@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix GivenDotnetPackageAdd test failure with noRestore set to false
Fix GivenDotnetPackageAdd test failures with package source mapping for Central Package Management
Jan 13, 2026
Member
|
I have (I think better) fix here: #52450 |
Member
|
closing in favor of better fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #52439.
The
FileBasedApp_CentralPackageManagement_NoVersionSpecified_KeepExistingtest was failing whennoRestore=falsedue to NuGet requiring package source mapping when using Central Package Management with multiple sources. Without it, NuGet issued NU1507 warnings and NU1101 errors for packages not available on all configured sources.Changes
NuGet.configcreation in test setup with package source mappingHumanizer*packages to nuget.orgThis satisfies NuGet's Central Package Management requirements and ensures all packages restore from appropriate sources.
All test combinations now pass, including previously failing scenarios with
noRestore=false.Original prompt
This section details on the original issue you should resolve
<issue_title>
GivenDotnetPackageAddnoRestore=falsefails to work with package source mapping</issue_title><issue_description>A Package Add test is failing when no restore is set to false.
This appears to impact release/10.0.1xx and release/10.0.2xx at the very least.
Microsoft.DotNet.Cli.Package.Add.Tests.GivenDotnetPackageAdd.Microsoft.DotNet.Cli.Package.Add.Tests.GivenDotnetPackageAdd.FileBasedApp_CentralPackageManagement_NoVersionSpecified_KeepExisting(legacyForm: True, fileOption: False, noRestore: False)