Skip to content

fix: restore <AssemblyVersion>1.0.0.0</AssemblyVersion> across all src csprojs (C4 post-mortem)#108

Merged
Chris-Wolfgang merged 2 commits into
vNextfrom
fix/restore-assemblyversion
Jun 1, 2026
Merged

fix: restore <AssemblyVersion>1.0.0.0</AssemblyVersion> across all src csprojs (C4 post-mortem)#108
Chris-Wolfgang merged 2 commits into
vNextfrom
fix/restore-assemblyversion

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Restores <AssemblyVersion>1.0.0.0</AssemblyVersion> + adds prerelease-safe <FileVersion> (via regex-strip property function) to every src csproj in this multi-project repo.

Why

The original C4 fanout dropped <AssemblyVersion> on the rationale that the hardcoded 1.0.0 was "stale" relative to released package versions. But that staleness was the correct binding-stability behaviour for libraries that ship a net462 TFM. With SDK-derived AssemblyVersion, every minor/patch release ships a different binding identity, breaking .NET Framework consumers without a binding redirect.

DateTime-Extensions v1.3.0 publicly shipped this regression. This repo has not yet released the regression (the C4 drop is on canonical-unprotected but hasn't reached main). Landing this fix neutralises the footgun across all src csprojs before any merge to main.

Csproj changes (per src project)

  <Version>...</Version>
+ <!-- Pin AssemblyVersion to a fixed binding-stability baseline so consumers
+      do not need to recompile / add binding redirects on every minor/patch
+      bump. Bump only on a deliberate breaking API change. FileVersion +
+      InformationalVersion (the latter auto-derived from <Version>) carry
+      the actual release version. -->
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ <FileVersion>$([System.Text.RegularExpressions.Regex]::Replace("$(Version)", "[-+].*$", "")).0</FileVersion>

The regex-strip property function ensures prerelease <Version> values (e.g., 1.2.3-beta.1) still produce a 4-part numeric AssemblyFileVersion (1.2.3.0) — verified locally on peer repos.

Standard pattern (NodaTime / Newtonsoft / AutoMapper)

Property Bumps on Example
AssemblyVersion breaking change only 1.0.0.0
AssemblyFileVersion every release <Version>.0
Version (NuGet) every release <Version>

Tracked in the per-repo-release-pilot skill as the corrected Phase 2 step 1.

…> in src/Wolfgang.Etl.TestKit/Wolfgang.Etl.TestKit.csproj (C4 fix)
…> in src/Wolfgang.Etl.TestKit.Xunit/Wolfgang.Etl.TestKit.Xunit.csproj (C4 fix)
Copilot AI review requested due to automatic review settings May 28, 2026 19:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores stable assembly binding metadata for the two shippable src projects, aligning their .NET Framework-facing assembly identity with the binding-stability rationale described in the PR.

Changes:

  • Adds fixed <AssemblyVersion>1.0.0.0</AssemblyVersion> to both source project files.
  • Replaces hardcoded <FileVersion>1.0.0</FileVersion> with a prerelease-safe value derived from <Version>.
  • Documents the intended AssemblyVersion/FileVersion behavior inline in each project file.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Wolfgang.Etl.TestKit/Wolfgang.Etl.TestKit.csproj Pins assembly version and derives file version from package version.
src/Wolfgang.Etl.TestKit.Xunit/Wolfgang.Etl.TestKit.Xunit.csproj Applies the same versioning metadata pattern to the Xunit companion package.

Base automatically changed from canonical-unprotected to vNext June 1, 2026 02:00
@Chris-Wolfgang Chris-Wolfgang merged commit 75bd893 into vNext Jun 1, 2026
1 check passed
@Chris-Wolfgang Chris-Wolfgang deleted the fix/restore-assemblyversion branch June 1, 2026 02:00
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.

2 participants