Skip to content

fix(nuget): repo nuget.config breaks corporate packageSourceMapping setups - #5

Merged
ChrisonSimtian merged 1 commit into
developfrom
bugfix/nuget-source-mapping
May 18, 2026
Merged

fix(nuget): repo nuget.config breaks corporate packageSourceMapping setups#5
ChrisonSimtian merged 1 commit into
developfrom
bugfix/nuget-source-mapping

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

Closes #2.

The repo's nuget.config registered nuget.org under the source name nuget and provided no packageSourceMapping block. Any contributor or CI agent with a user-level NuGet.Config containing a packageSourceMapping block keyed to nuget.org (extremely common in enterprise setups) gets a fully broken restore with cryptic NU1100 errors — because source mapping is keyed by source name, not URL.

Two changes:

  1. Rename source key nugetnuget.org (de-facto standard).
  2. Add explicit <packageSourceMapping> with <clear/> + wildcard → nuget.org. This wins over any inherited user-level mapping, so the repo is now immune to corporate config drift.

Tiny diff (+7/-1). Belt-and-braces — either change alone would help, both together are bulletproof.

Test plan

🤖 Generated with Claude Code

…etups

Renames the source key from `nuget` to `nuget.org` (the de-facto standard
name) and adds an explicit `<packageSourceMapping>` block that clears
inherited rules and routes all packages to nuget.org. Without this, any
contributor or CI agent whose user-level NuGet.Config contains a
`packageSourceMapping` block keyed to `nuget.org` (very common in
enterprise setups) gets a fully broken restore with cryptic NU1100
errors, because mapping is keyed by source name and the prior `nuget`
key did not match.

Verified by restoring against a corporate NuGet.Config with active
source mapping — succeeds where previously every project failed.

Refs #2

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enterprise hardening: repo nuget.config breaks corporate packageSourceMapping setups

1 participant