Skip to content

chore: finish CPM and move shared properties to Directory.Build.props - #12

Merged
StuartMeeks merged 1 commit into
mainfrom
chore/adopt-standard-cpm
Aug 20, 2026
Merged

chore: finish CPM and move shared properties to Directory.Build.props#12
StuartMeeks merged 1 commit into
mainfrom
chore/adopt-standard-cpm

Conversation

@StuartMeeks

Copy link
Copy Markdown
Owner

What changed

PR C of the NextIteration.Standards adoption sequence, and the last one. Closes §1.2 and §1.3, taking this repo to 27/27 machine-checkable clauses. §2.6 was already closed in PR A — the collector was referenced before that, but nothing passed --coverage, which is the difference between coverage collected and coverage listed in the dependency graph.

  • Directory.Packages.props gains CentralPackageVersionOverrideEnabled=false.
  • Directory.Build.props takes the fifteen properties both csprojs restated identically.
  • Each csproj now carries only what is specific to it.

Why

The override guard is the half of §1.3 that does the work. Without it MSBuild silently ignores a stray inline Version= and uses the central one — the exact drift the file exists to prevent, prevented without ever saying so. Verified rather than assumed: adding Version="0.50.0" to a PackageReference now fails restore with NU1008.

Fifteen copies of a property is fifteen chances for one to drift, and nothing fails when a csproj quietly disagrees with its sibling about DebugType. The test project keeps GenerateDocumentationFile=false as an explicit opt-out — fixture code has no XML docs and TreatWarningsAsErrors would otherwise fail the build over every missing one.

EnforceCodeStyleInBuild is deliberately absent. §1.2.1 is blocked.

Consumer impact

None, and this is the one step where that is demonstrated rather than asserted. Both sides packed at this commit from a clean obj/, per ADOPTING.md — a reused obj/ makes the two builds embed different git SHAs via SourceLink, which moves the MVID and the deterministic PE stamp, and both assemblies then "differ" for reasons that have nothing to do with CPM.

Package entry Before vs after
.nuspec sha256 identical
lib/net8.0/…dll sha256 identical
lib/net10.0/…dll sha256 identical
lib/net8.0 + net10.0 .xml sha256 identical
README.md, icon.png sha256 identical
[Content_Types].xml sha256 identical
.psmdcp content identical
.psmdcp filename differs — NuGet regenerates it per pack
_rels/.rels differs only in that filename

That is exactly the one difference ADOPTING.md names as acceptable, and nothing else.

No public API, target framework, dependency floor or on-disk format change. Versions were copied across unchanged.

Checklist

  • Build is clean — no new warnings (TreatWarningsAsErrors is on)
  • Tests pass on every shipped target framework — 64/64 on net8.0 and net10.0, coverage collected on both
  • Public API changes carry XML docs — no code changes
  • CHANGELOG.md updated under [Unreleased]
  • Dependency floors unchanged

🤖 Generated with Claude Code

PR C of the NextIteration.Standards adoption sequence, and the last one.
Closes 1.2 and 1.3, taking this repo to 27/27 machine-checkable clauses.
2.6 was already closed in PR A, which is what invoking the collector took
-- the package was referenced before that but nothing passed --coverage.

Directory.Packages.props gains CentralPackageVersionOverrideEnabled=false.
Without it MSBuild silently ignores a stray inline Version= and uses the
central one, which is the exact drift the file exists to prevent, and it
prevents it without ever saying so. Verified rather than assumed: adding
Version="0.50.0" to a PackageReference now fails restore with NU1008.

The fifteen properties both csprojs restated identically move to
Directory.Build.props. Each csproj now carries only what is specific to
it. The test project keeps GenerateDocumentationFile=false as an explicit
opt-out -- fixture code has no XML docs and TreatWarningsAsErrors would
otherwise fail the build over every missing one.

EnforceCodeStyleInBuild is deliberately absent. 1.2.1 is blocked.

Consumer impact proven, not asserted. Packed both sides at this commit
from a clean obj/, per ADOPTING.md -- a reused obj/ makes the two builds
embed different git SHAs via SourceLink, moving the MVID and the
deterministic PE stamp, and both assemblies then "differ" for reasons
that have nothing to do with CPM. Results:

  .nuspec                        sha256 identical
  lib/net8.0/*.dll               sha256 identical
  lib/net10.0/*.dll              sha256 identical
  lib/net8.0, net10.0 *.xml      sha256 identical
  README.md, icon.png            sha256 identical
  [Content_Types].xml            sha256 identical
  *.psmdcp content               identical
  *.psmdcp FILENAME              differs -- regenerated per pack
  _rels/.rels                    differs only in that filename

That is exactly the one difference ADOPTING.md names as acceptable.

Release build clean at zero warnings; 64/64 tests pass on net8.0 and
net10.0 with coverage collected on both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@StuartMeeks
StuartMeeks merged commit 828c741 into main Aug 20, 2026
10 checks passed
@StuartMeeks
StuartMeeks deleted the chore/adopt-standard-cpm branch August 20, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant