Repository navigation
Document NuGet minimum package publish age CLI options - #56733
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The new conceptual and NU1020 links depend on the still-open NuGet/docs.microsoft.com-nuget#3620, so cross-repository publication sequencing needs confirmation before merging.
No open issues 🎉
What changed in this PR
This PR documents minimum package publish age settings in the NuGet source CLI reference and clarifies the feature’s behavior in the .NET 11 SDK summary.
Changes:
- Document
--min-publish-age-hoursavailability, defaults, and examples for adding and updating sources. - Clarify automatic version selection, explicit-version bypass behavior, and NU1020 conditions for floating references.
- Link to detailed NuGet guidance, with publication dependent on the companion documentation PR.
| File | Description |
|---|---|
docs/core/whats-new/dotnet-11/sdk.md |
Clarifies minimum-age filtering and restore limitations. |
docs/core/tools/dotnet-nuget-update-source.md |
Documents the option and examples to set or remove the minimum age. |
docs/core/tools/dotnet-nuget-add-source.md |
Documents the option, default behavior, and a 72-hour example. |
Review effort: Balanced
jeffkl
approved these changes
Nov 3, 2026
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.
Summary
--min-publish-age-hoursondotnet nuget add sourceanddotnet nuget update source, including .NET SDK 11.0.100 availability, whole-hour values, default behavior, and set/reset examples.Related to NuGet/Home#15036. Companion documentation: NuGet/docs.microsoft.com-nuget#3620.
Sources and AI disclosure
Adapted behavior and availability from NuGet/docs.microsoft.com-nuget#3620, verified option registration against NuGet.Client, and executed source-command examples with SDK
11.0.100-rc.3.26522.148. No source prose was copied verbatim.Source-section breakdown:
AI-generated option prose/examples and AI-adapted SDK prose need subject-matter review. Changed articles carry
ai-usage: ai-assisted.Publication dependency: The conceptual and NU1020 links require publication of NuGet/docs.microsoft.com-nuget#3620.
Validation
git diff --check— passed. Article metadata, terminology, code-fence balance, and added relative-link checks — passed.Executed these commands with
$configpointing to an isolated temporary NuGet configuration file:All passed: inspected XML confirmed
minPublishAgeHours="72"after add/update and removal of the attribute after reset.Also executed the existing SDK examples in a clean isolated configuration:
Both passed: XML confirmed ages of 24 and 48 hours respectively. Also verified that an update without the option preserves the value, and that adding with zero or without the option leaves no age attribute. Temporary configuration removed; user-level NuGet configuration unchanged.
Markdown lint wasn't run successfully:
npx --no-install markdownlint-cli2with the edited article paths failed because the package wasn't installed. No tooling was installed.Internal previews
Build report