I hadn’t actually realised until last week that assembly build numbers are not automatically incremented on each build. I remember at some point in the past going looking for where Visual Studio was storing them, and being very confused as to how it managed to increment the build number without checking out any files in source control.
Last week I discovered that build numbers are actually based on the date – it is the number of days since a date specified in the registry (I think 1st Jan 2000 by default). For example, today’s build number with the default date is 3369. Since this behaviour can be a little annoying if you release multiple builds per day and your users refer to the build number, people have come up with various different solutions. I’ve found this one on CodeProject, but I haven’t actually tried it.
Revision numbers, on the other hand are related to the time of day. I’ve heard various different reports that they are the number of seconds since midnight, or half that, or a random number. Experimentally, they do seem to be related to the time, but I haven’t played around for long enough to work out the exact relationship. I’m also not sure what time zone is used to work this out – it may be the computer clock or it might be UTC or something else. Anyone who has bothered to actually do this, please feel free to post and let us know!