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 1.0.0.0 and 1.0.0.1 are interchangeable in a strong name environment but 1.0.1.1 is not?

What is the definitive answer, please?

Answers


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("1.2.3.0")]and use the AssemblyFileVersion-attribute for changing versions such as revisions, e.g. [AssemblyFileVersion("1.2.3.20120909")]. That gives you the possibility to update the version of a strongly named assembly without updating all references.


Need Your Help

How to create a dropdown with lu and li tags like this

javascript jquery html css dropdownbox

This dropdown in the screenshot is created by ul and li tags. I just know how to create the dropdown box but I am not sure how to create this scroll bar.

OCMock on a method with argument and returns a value

iphone objective-c ocmock

I have a class that relies on NSUserDefaults that I'm trying to unit-test and I'm providing the NSUserDefaults as a mock into my test class. When running the test, I get the error:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.