Monday, April 09, 2012

Olav's tale of three .Net Version Numbers. The Assembly Version, File Version and Information Version (Papa bear, Mama and Baby)

Olav's thoughts on coding - .NET Assembly Version Numbers

"Version numbers on .NET assemblies are both simple and complicated stuff. This post will explain the details of the different version numbers on an assembly and what they are used for, then I will show how we can modify all of them on an existing assembly without access to the source code from which it was originally built.

The 3 .Net Assembly Version Numbers
The simple story of version numbers is presented in the MSDN article Assembly Versioning.
  • The assembly's version number, which, together with the assembly name and culture information, is part of the assembly's identity. This number is used by the runtime to enforce version policy and plays a key part in the type resolution process at run time.
  • An informational version, which is a string that represents additional version information included for informational purposes only.

Ok, so an assembly has two version numbers, a real version number and a descriptive text thing, right?

Actually, no, it's not that simple.

Lets build a simple dll and look at the properties of the result in the file explorer:



Probably more information about .Net version Assembly version numbers than I 'll ever need (which is why I liked this post... :)

No comments: