Enhance NuGet feed selection to support pre-release packages - #2367
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The implementation breaks on supported PowerShell 5 and lacks corresponding schema and behavioral test updates.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds opt-in pre-release NuGet dependency resolution through a -allowPrerelease selection-mode suffix.
Changes:
- Parses and forwards the pre-release option.
- Documents configuration and release behavior.
- Depends on navcontainerhelper PR #4206.
File summaries
| File | Description |
|---|---|
Actions/RunPipeline/RunPipeline.ps1 |
Parses and forwards pre-release selection. |
Scenarios/settings.md |
Documents the suffix. |
RELEASENOTES.md |
Announces the feature. |
Review details
Suppressed comments (1)
Actions/RunPipeline/RunPipeline.ps1:410
- There is no behavioral test for this new parsing/forwarding path;
Tests/RunPipeline.Action.Test.ps1currently only compiles the action and checks its manifest. Add unit coverage that executes the capturedInstallMissingDependenciesscriptblock and verifies normal and case-insensitive suffixed modes, includingselectstripping andallowPrereleaseforwarding to both publish and download branches. This would also catch runtime-specific API incompatibilities.
"select" = $settings.nuGetFeedSelectMode.Replace("-allowPrerelease", "", [System.StringComparison]::OrdinalIgnoreCase)
"allowPrerelease" = $settings.nuGetFeedSelectMode.EndsWith("-allowPrerelease",[System.StringComparison]::OrdinalIgnoreCase)
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
I have implemented the same feature for a customer, who also needs this. |
❔What, Why & How
This pull request adds support for including pre-release versions of Business Central app packages from NuGet feeds by enhancing the
nuGetFeedSelectModesetting. Now, appending-allowPrereleaseto the select mode enables searching for pre-release packages. The documentation and pipeline logic have been updated to reflect and support this new capability.NuGet pre-release support:
nuGetFeedSelectModesetting inScenarios/settings.mdto explain that adding-allowPrereleaseas a suffix will include pre-release packages in dependency resolution.RunPipeline.ps1to extract the-allowPrereleaseflag fromnuGetFeedSelectMode, pass a newallowPrereleaseparameter, and clean up the select mode value accordingly.Release notes:
RELEASENOTES.mddescribing the new support for pre-release NuGet packages and how to enable it using the-allowPrereleasesuffix.This change requires microsoft/navcontainerhelper#4206.
Related to issue: #2315
✅ Checklist