Possible Duplicate:
Details of Assembly version
How does the Assembly Version get generated in VS/.NET? I know that there is a couple of strings in AssemblyInfo.cs or AssemblyInfo.vb with something like this:
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
But how does the final assembly version get created? How does it get incremented? Where does the last value get stored? We have a custom in-house release environment and I would like to customize the assembly version... I looked around on google but couldn't find anything... Any pointers?
AssemblyVersion: Specifies the version of the assembly being attributed. AssemblyFileVersion: Instructs a compiler to use a specific version number for the Win32 file version resource.
Whenever a new . NET assembly is created in the . Net environment, a file named AssemblyInfo is created that contains attributes used to define the version of the assembly during compilation. All versioning of assemblies that use the common language runtime is done at the assembly level.
"Assembly File Version" is what shows when you right-click on a file and go to "properties" then the "details" tab.
Using the "1.0.*" setting for the Assembly version will do the following:
So that's how the incrementing works...
The major and minor versions are not incrimented, they are fixed by what is specified. The build number is the number of days since January 1st, 2000. The revision number is the number of seconds since midnight (local time) divided by two.
You can see more detail on MSDN
...build to be equal to the number of days since January 1, 2000, local time, and revision to be equal to the number of seconds since midnight of the current day, local time, divided by 2.
Look into AssemblyInfo Task if you don't like the built in behaviour!
http://archive.msdn.microsoft.com/AssemblyInfoTaskvers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With