flowey: migrate nuget package restore from nuget.exe to dotnet restore#2935
Open
benhillis wants to merge 1 commit intomicrosoft:mainfrom
Open
flowey: migrate nuget package restore from nuget.exe to dotnet restore#2935benhillis wants to merge 1 commit intomicrosoft:mainfrom
benhillis wants to merge 1 commit intomicrosoft:mainfrom
Conversation
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.
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. |
Contributor
There was a problem hiding this comment.
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_packageto rundotnet restoreinto 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 forUseDotNet@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.
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.
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.