Prism Assembly Versioning
Assembly versioning is an important, and often ignored, aspect of a project. There are three assembly attributes defined in the AssemblyInfo.cs file of each project of Prism. These attribute are the AssemblyAttribute, the AssemblyFileAttribute, and the AssemblyInformationAttribute.
[assembly: AssemblyVersion("18.104.22.168")] [assembly: AssemblyFileVersion("22.214.171.124")] [assembly: AssemblyInformationalVersion("126.96.36.199")]
By convention, the four parts of each version are referred to as the Major Version, Minor Version, Build, and Revision.
This document decribes how Prism unitilizes each of these attributes to version its assemblies, and what numbering convention each attribute follows.
The AssemblyVersion is used by the CLR to bind to strongly named assemblies. It is stored in the AssemblyDef manifest metadata table of the built assembly, and in the AssemblyRef table of any assembly that references it. When you reference a strongly named assembly, which Prism is strongly named, you are tightly bound to that specific AssemblyVersion of that assembly.
For example; assume you referenced version 188.8.131.52 of an assembly and then built and released your application to your users. Then, an updated version of 184.108.40.206 which fixes a critical bug became available, and was dropped into the executing folder (possibly GAC) of your application. That binding would fail and your application would crash. You would have to reference the new 220.127.116.11 version and rebuild and redeploy your application.
To avoid this, Prism has adopted the following format for the AssemblyVersion:
We will only update the AssemblyVersion when there is a major or minor change in the functionality of the assembly. We will not update the AssemblyVersion when releasing bug fixes and updates.
The AssemblyFileVersion is intended to uniquely identify the build of an assembly. When patches and bug fixes are released, the AssemblyFileVersion is incremented to reflect those changes.
Prism has standardized on the following format for AssemblyFileVersion:
This will allow Prism to release bug fixes and updates without having to increment the AssemblyVersion. This enables you as a developer to patch your applications without having to re-reference Prism assemblies or recompile and re-release your application.
The AssemblyInformationalVersion is intended to allow coherent versioning of the entire product, which may consist of many assemblies that are independently versioned, and potentially developed by disparate teams. The AssemblyInformationAttribute is used to communicate to the community, or customers, what version of Prism is the current release.
For example; Assume we release a product with an AssemblyInformationAttribute of 18.104.22.168. This product may be made up of many assemblies with their AssemblyVersion ranging from 22.214.171.124 to 126.96.36.199. Although the individual assemblies are not versioned at 188.8.131.52, the product itself is a 2.0 release.
The AssemblyInformationAttribute lets us market Prism as an overall product made up of several related assemblies that have different assembly versions.
Prism has standardize on the following format for AssemblyInformationVersioning:
Note: This is the version that the Prism NuGet packages will match