Repository navigation
Packages: show the version's changelog section as NuGet release notes #346
Description
Problem
PackageReleaseNotes in Directory.Build.props is a link to the package's CHANGELOG.md on GitHub, blob/main, so a reader of an older version lands on today's file. A consumer on the nuget.org Release Notes tab, or in Visual Studio's Updates tab, which shows the same field, sees a link instead of the notes for the version they look at.
The changelog already holds exactly that text: each package's src/<package>/CHANGELOG.md has that version's lines for the package, in the form of the root section, which is the GitHub release's notes. The changelog convention tests hold that form.
Change
- At pack: set
PackageReleaseNotesfrom the version's section of each package's ownsrc/<package>/CHANGELOG.md. A shared MSBuild target, run before the nuspec is generated, reads the section under the heading for$(Version), previews included, up to the next##. - One footer line: link the full changelog on GitHub.
- Fail closed: pack fails with a message naming the file when the section is missing or empty. Release notes over nuget.org's 35,000-character limit also fail the pack.
- Rendering: nuget.org's documentation does not say whether release notes render as Markdown. Measure it on a real package page before choosing. If they show as plain text, write
[text](url)astext (url)and drop the inline-code backticks, so a line stays readable. Write down what was measured. - Guard: a convention test packs, or reads the packed nuspec the consumer smoke test produces, and asserts that
releaseNotesequals the version's section in that form. Seed it with a wrong section and see it fail.
Done when
The packed nuspec of every package carries its version's section as release notes, and the guard fails when the section is wrong or missing.
PackagingConventionTests currently asserts the link. It changes with this. The change goes into main (11.x) first and is cherry-picked (-x) into a PR against release/10.x.
Measured (2026-10-20)
nuget.org renders release notes as plain text: NuGetGallery/Helpers/HtmlExtensions.cs PreFormattedText HTML-encodes them, turns \n into <br />, and links only bare http(s) URLs (a # fragment is included; (, ) and a trailing . or , are not). On https://www.nuget.org/packages/bunit/2.12.5, ### Fixed, backticks and [@user](https://…) appear as typed, with only the URL inside the parentheses linked. Bogus 35.6.5 and Polly 8.8.0 behave the same way. So the notes are written with text (url), without backticks, ** or ### , and with a footer linking the changelog at the version's tag. Visual Studio's Updates tab was not measured. PR #347 (main) has the details.
Activity
CaffeinatedCoder commentedon Oct 20, 2026
For whoever opens the next 10.x version: the 10.x PR, #348, carries the code and tests but no changelog line, because
release/10.xis at the released 10.1.0 and no next version is open. When that version's sections are opened, add this line under### Changedin the root and all four package changelogs, as onmainin #347:Until then, a pack on
release/10.xwrites 10.1.0's section, so nothing breaks.