Assembly Version Checking in .Net
I am trying to fully get my head around assembly versions and strong names in .NET
I found This Assembly Versioning Article stating that only Major.Minor.Build is used in version matching. I cannot find anything that can confirm/deny this.
Assembly Version Format ... Revision: Assemblies with the same name, major, and minor version numbers but different revisions are intended to be fully interchangeable. This would be appropriate to fix a security hole in a previously released assembly.
MS Articles say things like:
The assembly version number is part of an assembly's identity and plays a key part in binding to the assembly and in version policy... Version checking only occurs with strong-named assemblies.
Does this mean that say 126.96.36.199 and 188.8.131.52 are interchangeable in a strong name environment but 184.108.40.206 is not?
What is the definitive answer, please?
I didn't find anything in the linked article stating that only Major.Minor.Build is used in version matching. In fact all four components of a version are used.
The key point is intended to be interchangeable. Whether or not they are actually interchangeable depends on the author, who is free to respect or ignore the MS guidelines.
A vendor of a shared assembly that is installed in the GAC can supply a publisher policy file to redirect from old to new version of the assembly. He should only do this if the new version is backward compatible with the old one.
The assembly's AssemblyVersion-attribute is being evaluated completely when comparing versions. Meaning that changing one part of the version number will result non-matching assemblies.
One way to work around this is to let the AssemblyVersion-attribute always unchanged e.g set to [AssemblyVersion("220.127.116.11")]and use the AssemblyFileVersion-attribute for changing versions such as revisions, e.g. [AssemblyFileVersion("18.104.22.16820909")]. That gives you the possibility to update the version of a strongly named assembly without updating all references.