Include NuGet.config in Helix test payloads - #85210
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1d6a35c4-0f49-4671-b352-8cac98e9eaa4
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
akhera99
approved these changes
Sep 8, 2026
jasonmalinowski
approved these changes
Sep 8, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is a small, targeted update consistent with existing payload setup patterns and directly addresses the missing config in work-item roots.
Review tier: Lite
Findings: None
What changed in this PR
Updates the Helix work-item payload generation in RunTests so each work item includes the repository NuGet.config, ensuring NuGet restore/asset resolution in Helix runs uses the repo-approved feeds rather than machine defaults.
Changes:
- Add
NuGet.configto each generated Helix work-item payload (alongside existingengandglobal.json). - Preserve the existing payload-shaping approach by using a symbolic link from the work-item root to the repo root
NuGet.config.
| File | Description |
|---|---|
| src/Tools/RunTests/HelixTestRunner.cs | Adds a NuGet.config symlink into each work-item payload directory so Helix executions pick up repo feed configuration. |
JoeRobich
enabled auto-merge
September 8, 2026 21:23
JoeRobich
deleted the
dev/jorobich/analyzer-tests-approved-nuget-config
branch
September 8, 2026 22:29
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 a hermeticity gap in Roslyn Helix test work items.
PrepareTestspreserves the repositoryNuGet.config, butHelixTestRunneronly includedengandglobal.jsonin each generated work-item payload. As a result, runtime NuGet clients such asMicrosoft.CodeAnalysis.Testing.ReferenceAssembliesloaded the Helix machine defaults and attempted to resolve packages from nuget.org.This change includes
NuGet.configat every work-item root. The config clears inherited package sources and uses the approved feeds, includingdotnet-public.This addresses the
Microsoft.NETCore.App.Ref.10.0.1failures observed in build 1587731 for #85107.Validation:
src/Tools/RunTests/RunTests.csprojNuGet.configSkippedNamespace_MoreDerivedNamespacetest with fresh NuGet and temporary package caches; it resolvedMicrosoft.NETCore.App.Ref.10.0.1successfullyMicrosoft.CodeAnalysis.PublicApiAnalyzers.UnitTests: 317 passedMicrosoft Reviewers: Open in CodeFlow