`aspire update` shoudl never override existing wildcard package source mapping
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
When trying to update aspire with `aspire update`, the update process tries to add nuget.org back
1. I have explicitly controlled my nuget.config file to not include `nuget.org`. Aspire shouldn't be adding it back for no good reason.
2. Adding a second wildcard mapping is a bit nonsensical.
If there are specific packages that need to come from nuget.org, then those specific packages should be added to the package source mapping. But even then, that smells like a smell - if a user has chosen (or more likely been forced by company policy) to use an itnernal proxy, then aspire should not bypass that for things on nuget.org.
```
Perform updates? [Y/n]: y
Which directory for NuGet.config file? (REDACTED): REDACTED
Added: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json
Mapping: Aspire* (added)
Added: https://api.nuget.org/v3/index.json
Mapping: * (added)
Retained: REDACTED
Mapping: *
Apply these changes to NuGet.config? [Y/n]: n
```
### Expected Behavior
1. I have very explicitly removed nuget.org from my nuget packages source. `aspire update` should not add it back.
2. Adding the aspire internal feed is reasonable as the package source mapping is narrowly scoped to `Aspire.*`.
### Steps To Reproduce
1. Have a `nuget.config` like the following, in a project with an old version of aspire
2. Run `aspire update --channel daily`
```xml
```
### Exceptions (if any)
_No response_
### Aspire doctor output
_No response_
### Anything else?
13.6.0-preview.1.26410.1+9b79ab510c9f171c48e3af1d69ff6a941127f9a5
Contributor guide
Research direction
Start by locating the `aspire update` code that reads and modifies NuGet.config, then reproduce the command with the package source mapping shown in the issue. Verify that an existing wildcard mapping is preserved and that nuget.org is not added; the Aspire.* source mapping should still be handled as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100