Skip to content

[release/10.0.1xx] Fix dnx not authenticating for private feeds#53777

Open
github-actions[bot] wants to merge 3 commits intorelease/10.0.1xxfrom
backport/pr-53322-to-release/10.0.1xx
Open

[release/10.0.1xx] Fix dnx not authenticating for private feeds#53777
github-actions[bot] wants to merge 3 commits intorelease/10.0.1xxfrom
backport/pr-53322-to-release/10.0.1xx

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 9, 2026

Backport of #53322 to release/10.0.1xx

/cc @baronfel @robertcoltheart


Fixes #51375

Customer Issue

dotnet tool exec / dnx fails with 401 Unauthorized when executing tools from authenticated private NuGet feeds (e.g. GitHub Packages, Azure Artifacts), even when credentials are correctly configured in NuGet.config or via environment variables. The same credentials work correctly with dotnet tool install against the same feed. The only workaround is to install the tool globally first and then invoke it directly, which defeats the purpose of ad-hoc tool execution. This affects any user who uses dnx or dotnet tool exec with a private authenticated source.

Description

When resolving packages for dnx/dotnet tool exec, the code was constructing and passing the raw source URL as an override source (equivalent to passing --source https://... on the command line). This bypasses the credential association stored in NuGet.config for that named source, causing authentication to fail on subsequent requests. The fix passes the named source entry from NuGet.config instead, preserving the credential binding throughout the download operation. The change is minimal and limited to the dnx execution path.

Was this a regression?

  • Yes
  • No

Testing

Covered by the existing test suite validated in the original PR (#53322). Manual testing by contributor on internal private repos. Ongoing discussion with NuGet team about ways to mimic authenticated feeds for automated testing.

Risk

Low. The change is narrowly scoped to how the NuGet source is identified during dnx/dotnet tool exec package resolution. It only affects users with named authenticated sources, and restores the behavior that already works correctly in dotnet tool install.

@github-actions github-actions bot added the backport PR that has been backported to a servicing branch label Apr 9, 2026
@baronfel
Copy link
Copy Markdown
Member

baronfel commented Apr 9, 2026

/ba-g known issue with missing .net framework VS assets on the new build images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport PR that has been backported to a servicing branch Servicing-consider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants