Skip to content

Packages: show the version's changelog section as NuGet release notes #346

Open

Description

@CaffeinatedCoder

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 PackageReleaseNotes from the version's section of each package's own src/<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) as text (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 releaseNotes equals 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

  1. added this to the 11.0.0 milestone on Oct 20, 2026
  2. added
    choreBuild, CI, packaging, refactoring with no behaviour change
    package/nodatimeAffects CodoMetis.ValueRanges.NodaTime
    package/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQL
    area/releaseVersioning, changelogs, release wiring
    package/coreAffects CodoMetis.ValueRanges
    package/efcore-nodatimeAffects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTime
    on Oct 20, 2026
  3. CaffeinatedCoder commented on Oct 20, 2026

    @CaffeinatedCoder
    OwnerAuthor

    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.x is at the released 10.1.0 and no next version is open. When that version's sections are opened, add this line under ### Changed in the root and all four package changelogs, as on main in #347:

    - Packaging: a package's release notes on nuget.org and in Visual Studio are its version's section of its changelog, in plain text, ending with a link to the changelog at the version's tag, where they were a link to the latest changelog ([Changelog](https://github.com/CaffeinatedCoder/CodoMetis.ValueRanges/blob/main/CHANGELOG.md)).
    

    Until then, a pack on release/10.x writes 10.1.0's section, so nothing breaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/releaseVersioning, changelogs, release wiringchoreBuild, CI, packaging, refactoring with no behaviour changepackage/coreAffects CodoMetis.ValueRangespackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQLpackage/efcore-nodatimeAffects CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTimepackage/nodatimeAffects CodoMetis.ValueRanges.NodaTime

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions