fix: restore <AssemblyVersion>1.0.0.0</AssemblyVersion> (C4 post-mortem)#188
Merged
Conversation
…4 fix) The 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 a library shipping a net462 TFM. SDK-deriving AssemblyVersion from <Version> changes the binding identity on every minor/patch bump, breaking .NET Framework consumers without binding redirects.
Contributor
There was a problem hiding this comment.
Pull request overview
Restores <AssemblyVersion>1.0.0.0</AssemblyVersion> to the main library csproj and adds <FileVersion>$(Version).0</FileVersion> so .NET Framework consumers don't require binding redirects on every minor/patch bump, while file/informational versions still track the actual release version.
Changes:
- Re-add a pinned
AssemblyVersionof1.0.0.0with an explanatory comment. - Add
FileVersionderived from$(Version)to carry the actual release version into the assembly metadata.
Addresses Copilot review feedback on the fix/restore-assemblyversion PR: - Reword comment so it does not imply AssemblyVersion tracks NuGet major (it is a fixed binding-stability baseline, not derived from Version). - Use regex-strip property function for FileVersion so prerelease <Version> values (e.g., 0.1.0-alpha) still produce a 4-part numeric AssemblyFileVersion (otherwise FileVersion fails the build). - Remove pre-existing literal <FileVersion>1.0.0</FileVersion> where present (ETL repos) since MSBuild last-write semantics would otherwise override the property-function value.
This was referenced Jun 23, 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.
Restores
<AssemblyVersion>1.0.0.0</AssemblyVersion>+ adds<FileVersion>$(Version).0</FileVersion>to the src csproj.Why
The original C4 fanout dropped
<AssemblyVersion>on the rationale that the hardcoded1.0.0was "stale" relative to released package versions. But that staleness was the correct binding-stability behaviour for a library that ships anet462TFM. With SDK-derived AssemblyVersion, every minor/patch release ships a different binding identity, so .NET Framework consumers need a binding redirect on every bump or they hit a runtimeFileLoadException.DateTime-Extensions v1.3.0 publicly shipped this regression. This repo has not yet released the regression (the C4 drop is on
canonical-unprotectedbut hasn't reachedmain). Landing this fix neutralises the footgun before any merge to main.Standard library pattern (NodaTime / Newtonsoft / AutoMapper)
AssemblyVersion1.0.0.0AssemblyFileVersion<Version>.0Version(NuGet)<Version>AssemblyVersiononly changes on a deliberate breaking API change (i.e.,2.0.0.0).Tracked in the per-repo-release-pilot skill as the corrected Phase 2 step 1.