Repository navigation
Use repo NuGet.Config to restore arcade - #6121
Conversation
There was a problem hiding this comment.
Thanks a lot. It would be good to search for the NuGet.config file with insensitive casing as some repos use a different format (i.e. nuget-client).
dotnet/repo-projects/Directory.Build.props
Lines 56 to 57 in fa7dfcf
Co-authored-by: Adeel Mujahid <[email protected]>
|
Thanks, @ViktorHofer. I've made the search case-insensitive at depth 0 (only searching the repo root). I think NuGet officially supports three casings: NuGet.Config, NuGet.config, and nuget.config (https://github.com/NuGet/NuGet.Client/blob/de3b92c2768037cceac21a7bcc53318d42554428/src/NuGet.Core/NuGet.Configuration/Settings/Settings.cs#L29). Other variants will not work, but that error will be handled by the toolset. Here, we've just made it permissive so the script can pass. If it makes sense, I can add upfront validation in the script for the supported casings, but I think that would introduce maintenance overhead when the list changes upstream. |
|
Thanks, this is good enough. Can you please make the same changes to src/arcade/eng/common? That is the actual outgoing location for eng/common updates. The current updates wouldn't flow to repos as they only touch files from the bootstrap layer. |
There was a problem hiding this comment.
Pull request overview
Restores the ability to restore the Arcade SDK using the repo’s NuGet.Config even when the current working directory is not the repo root, aligning restore behavior with prior expectations for building the runtime repo from arbitrary directories.
Changes:
tools.sh: IfNUGET_CONFIGis not set, locate anuget.configfile in the repo root and pass it todotnet package download.tools.ps1: Same behavior for PowerShell by discovering a repo-rootnuget.configwhenNUGET_CONFIGis unset.
Show a summary per file
| File | Description |
|---|---|
| eng/common/tools.sh | Adds repo-root nuget.config discovery and uses it for Arcade SDK package download restore. |
| eng/common/tools.ps1 | Adds repo-root nuget.config discovery and uses it for Arcade SDK package download restore. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
Co-authored-by: Copilot <[email protected]>
Before the recent change, we used to be able to build runtime repo without needing to have pwd==root_of_runtime_repo. Now it fails to restore Arcade SDK because repo's NuGet.Config is not respected. This PR restores the old behavior.