Uh oh!
There was an error while loading. Please reload this page.
Fix dnx not authenticating for private feeds - #53322
Conversation
robertcoltheart
commented
Mar 8, 2026
@baronfel@marcpopMSFT This is ready for review now |
robertcoltheart
commented
Mar 21, 2026
Sorry to ping, @baronfel or @marcpopMSFT are you able to take a look at this? |
Frulfump
commented
Mar 26, 2026
Frulfump
commented
Mar 26, 2026
Is there any test that would make sense to add? |
dsplaisted
commented
Mar 30, 2026
Looks good. @dotnet/dotnet-sdk Do we have any test private feeds we could use to add a test for this? |
robertcoltheart
commented
Mar 31, 2026
There were never any tests for the |
marcpopMSFT
commented
Apr 3, 2026
@dsplaisted I think we'd need to ask dnceng. They likely have some feeds but creating a specific testcase may be trickier. My recommendation is to take this fix as is and file a separate issue to expand on the testing of tool exec including this scenario as a separate PR. We can probably have copilot generate at least a core of exec tests. |
robertcoltheart
commented
Apr 4, 2026
Thanks all. I added a test for the nuget downloader to ensure it selects the correct source, but further testing for the tool execute command is going to require significantly more refactoring that I'm not comfortable doing as part of this change. |
| @@ -114,8 +114,9 @@ public override int Execute() | |||
| // other feeds, but this is probably OK. | |||
| var downloadPackageLocation = new PackageLocation( | |||
There was a problem hiding this comment.
This mechanism ("constructing a packageLocation from a common set of nuget-feed-related input options") feels like something we need to be able to extract and share across many of our nuget-related commands. After this merges we should probably try to unify how we do this to prevent regressions like this.
baronfel
commented
Apr 6, 2026
The thing I'd immediately reach for is a docker container for a NuGet server - there doesn't seem to be one out in the wild, and the one I did see just used API Key access, and I'm not sure if that would be enough to test with. Will ask the NuGet team about how they'd go about this. |
robertcoltheart
commented
Apr 6, 2026
Thanks for approving. I'm not sure why the build is failing, if someone can perhaps re-run it for me if required? |
baronfel
commented
Apr 6, 2026
We're having some build infra problems across multiple repos at the moment - as soon as that clears up we'll get the pipelines going here again 👍 |
dsplaisted
commented
Apr 8, 2026
With respect to testing, have we done any manual testing to make sure that this fixes the issue? |
robertcoltheart
commented
Apr 8, 2026
Yes I've run this manually in my corporate environment where we use authenticated nuget sources and verified that it works. |
baronfel
commented
Apr 8, 2026
I don't believe that these test failures are related to this change - they cover publishing which isn't impacted by changes to tool download/invocation. |
baronfel
commented
Apr 8, 2026
@dotnet/domestic-cat I think the test errors on this PR are indicative of a known build error that we need to log and figure out - can y'all handle that? |
baronfel
commented
Apr 9, 2026
/ba-g known errors around C++/VS build components not being installed on the newly-recreated base images |
Uh oh!
There was an error while loading. Please reload this page.
baronfel
commented
Apr 9, 2026
/backport to release/10.0.1xx |
baronfel
commented
Apr 9, 2026
/backport to release/10.0.2xx |
Started backporting to |
Started backporting to |
Fixes#51375
For
dnxexecution (dotnet tool exec), if the package source is authenticated the previous method of passing an override source meant that the credentials are lost, since this is the equivalient of passing--source https://mysourceand ignoring any config inNuGet.config. We need to pass the explicit source fordnxbecause we confirm with the user that we will be downloading from a particular source (which may be authenticated).