Assembly Version

14 views
Skip to first unread message

lukas-ais

unread,
Jun 6, 2012, 3:14:13 AM6/6/12
to moq...@googlegroups.com
I'm wondering a bit about the used version of the assemly. The recent code shows following:
[assemblyAssemblyVersion("4.0.10818.0")]
[assemblyAssemblyFileVersion("4.0.0.0")]

In the past I found sometimes incremental changes of the assembly version. But the file version was not changed.

My understanding of AssemblyVersion and AssemblyFileVersion is this:
AssemblyVersion: This version number is only changed if the interface of the assembly was changed (incompatible).
AssemblyFileVersion: This version number is changed with each change of the assembly. So it identifies the version of compiled source.

I would recommend to set the assembly version to 4.0.0.0 and the file version to 4.0.10818.0.
Further on each major (compatible) change the 3rd number is incemented and on each minor change the 4th number is incremented.

Further the latest commit id could be integrated into AssemblyInfo.cs. In this case the manual incrementation of the 4th number is not really required.

What do you think?

Regards,
Lukas

Daniel Cazzulino

unread,
Jun 6, 2012, 7:38:41 AM6/6/12
to moq...@googlegroups.com
Assembly file version is informative only. Its fixed to the major version of the release and nothing more.

Assembly version changes everytime you publish a new build. The major/minor/build/release determine what kind of compatibility is expected WRT previous releases. If you have existing code compiled against a previous version of the AssemblyVersion, you use runtime binding redirects to point it to the new version.

The github commit id is not a number that fits in the restrictions of a .NET Version, but I'm all for finding a way to correlate both easily

/kzu

--
Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1 425.329.3471


Reply all
Reply to author
Forward
0 new messages