Use repository NuGet configuration for SDK dump restores - #20062
Use repository NuGet configuration for SDK dump restores#20062James Newton-King (JamesNK) wants to merge 2 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20062Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20062" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix is consistent across both scanner paths and has appropriate regression coverage.
Pull request overview
Fixes #20029 by making SDK capability scanning inherit the repository’s NuGet sources and package mappings.
Changes:
- Copies the repository NuGet configuration into temporary scanner projects.
- Adds regression coverage for both output modes and cleanup.
File summaries
| File | Description |
|---|---|
src/Aspire.Cli/Commands/Sdk/SdkDumpCommand.cs |
Prepares temporary scanner projects with repository NuGet configuration. |
tests/Aspire.Cli.Tests/Commands/SdkDumpCommandTests.cs |
Verifies configuration copying and temporary-directory cleanup. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Tests selector2 / 99 PR test projects · 4 PR jobs · 1 advisory-only target, from 7 changed files. Selected PR test projects (2 / 99)
Selected PR jobs (4)
Advisory workflow impact (1)
How these were chosen — grouped by what changed📦 affected project 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is narrowly scoped and includes focused coverage for configuration discovery, relative feeds, inherited settings, and cleanup.
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
Running
aspire sdk dumpagainst the local Aspire checkout can fail before scanning capabilities because the scanner's temporary app directory is outside the repository's NuGet configuration hierarchy. The failures linked from #20029 reportNU1100errors resolving Dashboard's Fluent UI packages, not warnings in the exported capabilities.In repository-development mode, SDK dump now starts NuGet configuration discovery from the repository root. Configuration files remain in their original locations, preserving package-source names and mappings, relative feed paths, and settings inherited from parent directories.
--outputand--output-directorypass the detected repository root through the AppHost server project factory.RestoreRootConfigDirectoryand skips copying the app's NuGet configuration when this override is supplied. Other callers retain their existing configuration behavior.Fixes #20029
Example
The existing checkout-development command uses the repository's NuGet configuration automatically, without new command-line options:
Validation
_GetRestoreSettingstarget without restoring packages. It verifies that relative feeds resolve beside the original repository and parent configuration files, inherited settings remain available, and a conflicting app-local configuration is not used.SdkDumpCommandTests,AppHostServerProjectTests, andGuestAppHostProjectTestspassed locally on Windows, with quarantined and outerloop tests excluded.SdkDumpCi_ForHostingProject_DoesNotEmitWarningssuccessfully.git diff --checkpassed.Checklist
<remarks />and<code />elements on your triple slash comments?