Currently, I am using AssemblyVersionAttribute to specify assembly versions of compiled assemblies.
However, AssemblyVersionAttribute allows to specify only 16bit revision [1]. How can I specify MajorRevision greater than zero?
Currently, I am using AssemblyVersionAttribute to specify assembly versions of compiled assemblies. However, AssemblyVersionAttribute
Share
The
MajorRevisionandMinorRevisionproperties of theVersionclass are calculated from theRevisionproperty, asRevision >> 16andRevision & 0xffffrespectively (try opening mscorlib in Reflector).Assembly versioning does not support revision numbers greater than 16 bits in length. This data is stored in a 16 bit section of the assembly binary. In other words, assembly versions support only a subset of the capabilities of the
Versionclass. You can see this in a hex editor: setting the version to, say, 1.0.0.65534, will give the hex bytes in the compiled DLL0100 0000 0000 feff. Trying to insert a value in the following two bytes and then inspecting the assembly does not increase the version number beyond 16 bits.