Fix the internal 8.0 builds to correctly use the internal feeds to install the workloads - #54242
Merged
Merged
Conversation
The dotnet workload update subprocess fails with 401 Unauthorized on internal feeds because DOTNET_CLI_HOME redirection causes NuGet to look for the credential provider plugin in artifacts/tmp/ instead of the user profile where it's actually installed. Fix: Pass NUGET_PLUGIN_PATHS env var pointing to the Azure Artifacts Credential Provider at its actual location under USERPROFILE, and pass --configfile pointing to the repo NuGet.config. Also remove diagnostic logging from previous investigation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use HOME on Linux/Mac and USERPROFILE on Windows to locate the Azure Artifacts Credential Provider. Also use forward slashes for cross-platform path compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the SDK overlay-on-LKG build step to reliably install workload manifests in internal builds by ensuring dotnet workload update runs with the correct NuGet configuration and can locate the Azure Artifacts credential provider even when DOTNET_CLI_HOME is redirected.
Changes:
- Adds logic to pass
NUGET_PLUGIN_PATHS(when the credential provider exists) to thedotnet workload updatesubprocess. - Forces workload update to use the repo
NuGet.configvia--configfile. - Centralizes the environment variables passed to workload update into an item list.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+101
to
+103
| <_UserHome Condition="'$(USERPROFILE)' != ''">$(USERPROFILE)</_UserHome> | ||
| <_UserHome Condition="'$(_UserHome)' == ''">$(HOME)</_UserHome> | ||
| <_CredentialProviderPath>$(_UserHome)/.nuget/plugins/netcore/CredentialProvider.Microsoft/CredentialProvider.Microsoft.dll</_CredentialProviderPath> |
nagilson
approved these changes
May 11, 2026
This was referenced Jun 10, 2026
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 #54237
We were getting 401 errors from the feeds when installing the test workloads. After going through the binlog with copilot, this is the solution and this looks right to me.
Test build below is passing the main SDK build on all legs.
https://dev.azure.com/dnceng/internal/_build/results?buildId=2970684&view=logs&j=7a30c6f6-6636-503e-7c63-a02a61cefc9a&t=c608e0de-ddda-52f2-bd6a-8e56778f44b6