Skip to content

flowey: migrate nuget package restore from nuget.exe to dotnet restore#2935

Open
benhillis wants to merge 1 commit intomicrosoft:mainfrom
benhillis:user/benhill/dotnet_restore
Open

flowey: migrate nuget package restore from nuget.exe to dotnet restore#2935
benhillis wants to merge 1 commit intomicrosoft:mainfrom
benhillis:user/benhill/dotnet_restore

Conversation

@benhillis
Copy link
Member

@benhillis benhillis commented Mar 11, 2026

Replace nuget.exe with dotnet restore for all NuGet package downloads. Authentication on local builds uses az CLI session tokens passed via VSS_NUGET_EXTERNAL_FEED_ENDPOINTS. CI builds use the UseDotNet ADO task and pipeline-level auth.

Removes the Azure Credential Provider module and external_nuget_auth plumbing, which are no longer needed.

Adds install_dotnet_cli and ado_task_use_dotnet flowey nodes. Parses nuget.config with roxmltree to properly filter the section and extract feed URLs. Handles cross-filesystem moves in the package install path via a rename-with-fallback helper.

One motivator for this change is that this will allow us to use Azure Linux for our release build pipeline. We cannot currently do this because the "blessed" version of Azure Linux does not have mono, nor is the Azure Linux team willing to add it. It will also get rid of the spurious nuget install failures we are currently seeing in CI.

Replace nuget.exe with dotnet restore for all NuGet package downloads.
Authentication on local builds uses az CLI session tokens passed via
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS. CI builds use the UseDotNet ADO task
and pipeline-level auth.

Removes the Azure Credential Provider module and external_nuget_auth
plumbing, which are no longer needed.

Adds install_dotnet_cli and ado_task_use_dotnet flowey nodes. Parses
nuget.config with roxmltree to properly filter the <config> section
and extract feed URLs. Handles cross-filesystem moves in the package
install path via a rename-with-fallback helper.
@benhillis benhillis requested a review from a team as a code owner March 11, 2026 00:37
Copilot AI review requested due to automatic review settings March 11, 2026 00:37
@benhillis benhillis requested a review from a team as a code owner March 11, 2026 00:37
@benhillis
Copy link
Member Author

In a follow-up change I am going to remove the nodes that install nuget.exe. There are some internal pipelines that still use them, but I will address that as a followup change.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates Flowey’s NuGet package acquisition from nuget.exe install to dotnet restore by generating a synthetic .csproj, simplifying auth (pipeline ambient creds on CI; az-derived session token locally), and removing no-longer-needed credential-provider plumbing.

Changes:

  • Reworks nuget_install_package to run dotnet restore into a temp packages dir, then flattens/moves outputs into the expected install layout.
  • Adds Flowey nodes for installing/locating dotnet (install_dotnet_cli) and an ADO wrapper for UseDotNet@2; removes the Azure Credential Provider module + ADO NuGet tool installer.
  • Removes local CLI flags/config related to nuget.exe (WSL mono forcing, external auth bypass).

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
flowey/flowey_lib_hvlite/src/_jobs/cfg_common.rs Drops nuget-specific local params and wires in install_dotnet_cli for local setups.
flowey/flowey_lib_common/src/nuget_install_package.rs Implements NuGet restore via dotnet restore + temp workdir + auth via VSS_NUGET_EXTERNAL_FEED_ENDPOINTS.
flowey/flowey_lib_common/src/lib.rs Exposes new dotnet-related modules; removes credential-provider module export.
flowey/flowey_lib_common/src/install_nuget_azure_credential_provider.rs Removed (no longer needed with new auth approach).
flowey/flowey_lib_common/src/install_dotnet_cli.rs New node to locate/install .NET SDK across ADO/GitHub/Local.
flowey/flowey_lib_common/src/download_nuget_exe.rs Simplifies API; removes ADO support and platform/mono-selection plumbing.
flowey/flowey_lib_common/src/ado_task_use_dotnet.rs New ADO task wrapper for UseDotNet@2.
flowey/flowey_lib_common/src/ado_task_nuget_tool_installer.rs Removed (nuget.exe tool installer no longer used).
flowey/flowey_lib_common/Cargo.toml Adds roxmltree + tempfile deps for nuget.config parsing and temp restore dirs.
flowey/flowey_hvlite/src/pipelines_shared/cfg_common_params.rs Removes local CLI flags for nuget mono/external auth.
flowey/flowey_hvlite/src/pipelines/vmm_tests.rs Removes now-deleted nuget-related LocalOnlyParams fields.
flowey/flowey_hvlite/src/pipelines/restore_packages.rs Removes now-deleted nuget-related LocalOnlyParams fields.
flowey/flowey_hvlite/src/pipelines/custom_vmfirmwareigvm_dll.rs Removes now-deleted nuget-related LocalOnlyParams fields.
flowey/flowey_hvlite/src/pipelines/build_igvm.rs Removes now-deleted nuget-related LocalOnlyParams fields.
Cargo.toml Adds workspace dependency on roxmltree.
Cargo.lock Locks roxmltree and tempfile additions.

You can also share your feedback on Copilot code review. Take the survey.

@github-actions
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants