Skip to content

C#: Use feed management in the remaining restore flows.#22041

Draft
michaelnebel wants to merge 9 commits into
github:mainfrom
michaelnebel:csharp/morefeedmanageruses
Draft

C#: Use feed management in the remaining restore flows.#22041
michaelnebel wants to merge 9 commits into
github:mainfrom
michaelnebel:csharp/morefeedmanageruses

Conversation

@michaelnebel

@michaelnebel michaelnebel commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The primary purpose of this PR is to use the newly introduced feed manager in more of the package restore flows.

To achieve this we are

  • Re-factoring a bit more functionality into the feed manager to avoid arguments being passed around in the NuGet package restorer.
  • Use the feed manager in DowloadMissingPackages. This also somewhat simplifies the restore logic as we no longer create a dedicated nuget.config file in fallback scenarios, but instead we supply feeds directly via the command line. Furthermore, if NuGet feed responsiveness checking is disabled we use all feeds when attempting to download missing packages (this will include private registries as well).
  • Use the feed manager in the TryRestore method, which can be used to restore individual packages. The logic has been changed slightly here compared to earlier as we will attempt to use the feeds detected in the source directory (instead of those in the temporary directory).

With the changes in this PR, all restore like flows specify the feeds directly via the command line (unless NuGet feed checking is disabled and no private registries are configured). That is, as a follow up we can attempt the remove the timeout fallback and instead just always use reachable feeds.

Review on a commit by commit basis is encouraged.

We should make a QA run before merging.

@github-actions github-actions Bot added the C# label Jun 24, 2026
@michaelnebel
michaelnebel force-pushed the csharp/morefeedmanageruses branch from 25ade27 to afe8f07 Compare June 24, 2026 10:58
@michaelnebel
michaelnebel force-pushed the csharp/morefeedmanageruses branch 5 times, most recently from 29a859a to 036f75c Compare June 24, 2026 13:47
@michaelnebel
michaelnebel force-pushed the csharp/morefeedmanageruses branch from 036f75c to 86fc08e Compare June 25, 2026 11:06
@michaelnebel
michaelnebel force-pushed the csharp/morefeedmanageruses branch 3 times, most recently from 4690d92 to 6ee50ce Compare June 30, 2026 13:05
@michaelnebel
michaelnebel force-pushed the csharp/morefeedmanageruses branch from 43aaec6 to fde527a Compare June 30, 2026 14:21
@michaelnebel michaelnebel changed the title C#: Improve package download logic. C#: Use feed management in the remaining restore flows. Jul 1, 2026
@michaelnebel
michaelnebel force-pushed the csharp/morefeedmanageruses branch from fde527a to bbc01c9 Compare July 17, 2026 09:33
…mSpecificFeeds as it is always called with this argument.
…instead of a specific nuget.config file, and supply a list of nuget sources when using the TryRestore.
@michaelnebel
michaelnebel force-pushed the csharp/morefeedmanageruses branch from bbc01c9 to b0eaf49 Compare July 17, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants