Jan Schreuder on .Net

.Net code samples, experiences, observations

View my professional profile on LinkedIn

Recent Posts

Tags

News

  • Inappropriate comments will be deleted at my discretion.

    The information and code samples in this weblog is provided "AS IS" without warranty of any kind, either expressed or implied, including but not limited to the merchantability and/or fitness for a particular purpose.

Community

Email Notifications

Tool suppliers

Tools

General

Microsoft

Favorite blogs

Archives

Guidelines for version numbers. What do you think?

In my current project, we felt that we needed a fixed protocol as to how version numbers should be applied to .Net assemblies. We tried looking for information (from Microsoft or other sources) that would give us at least a guideline as to how we should handle this. And this proved to be a lot more difficult than I imagined.

In the end, I created this guideline based on previous experiences and on what I feel it should be.

Version number

Description

Major

This value represents the version number for the application. During development, the value will be 0 to indicate the product is not ready for release.

As soon as the product is ready for release, the value will be set to 1. The number will be increased each time there is a major change in functionality or a huge revision of the underlying architecture.

Minor This value is reset to 0 for every increase of the Major value. It will be increased when new functionality has been added, or when significant fixes have been made after problems have been reported.   
Revision This value is reset to 0 for every increase of the Minor value. It will be increased when fixes have been applied after problems have been reported.
Build number This value is increased by the compiler. It is only used to give an indication if the current assembly is the most recent for a given Major.Minor.Revision.

I would really like to here your opinion on this. How do you apply version numbering, and what guidelines do you use? Let me know!

Comments

spaccabit said:

# August 9, 2006 12:24 AM

P.J. van de Sande said:

Increasing the build number is only done by the Build Server?
# August 9, 2006 12:48 AM

Ramon Smits said:

We have a daily build system at our current project. The build server increases the build number every day. When a developer does a local build on his workstation then it always has the buildnumber 9999. I personally don't like the local buildnumber of the fixed 9999. Would have been better if it would start at 10000 and increment for each build. This way you can more easily spot build dependancy errors.

I use subversion at home. Subversion has revision numbers for check-ins. My CI build system uses that number as the buildnumber.

This almost has the same effect as the daily build server and labels on source-safe.

You could say that we use the revision number for production patches at a version number branch.

The major/minor identify a branch in the repository and should match with a certian set of functionality or stability requirements.

I also like the linux versioning scheme:
http://en.wikipedia.org/wiki/Linux_kernel#Version_numbering

Which if quite relaxed to identify increments within a project and hotfixes on those increments. You would lose the buildnumber though so you should use something else to identify the build.
# August 9, 2006 12:49 AM

Erwyn van der Meer said:

I agree with the major/minor/revision part of your versioning scheme.

But I would distinguish the file version from the assembly version, i.e., the AssemblyVersionAttribute and the AssemblyFileVersionAttribute. In the assembly version I keep the build number fixed at 0 to prevent problems with having to update strong named references that use the assembly version number for each build. In the file version the build number is set by the build server and increased after each build. For a local build by a developer a fixed build number can be used for the file version.

So increasing the major/minor/revision part of the version number is a conscious decision and might involve updating strong name references. Increasing the build number is done automatically. The build number in the file version is irrelevant for binding.
# August 9, 2006 3:36 AM

Ramon Smits said:

@Erwyn: Jups.. the assembly version is static in our builds. Didn't directly reflect is to .net but this is the case for our .net deliverables.

The file version is very important for installers! Installers only look at the major.minor.revision and ignore the buildnumber. If an installer sees that a dll with version 1.2.3(.2) is installed and you install another product with dll 1.2.3(6) then the installer ignores the .6 library.
# August 9, 2006 3:57 AM

Olaf Conijn said:

I believe the way most java-guys do this makes pretty much sense to me:

A: complete new release
B: some public APIchanges have occured that might be breaking
C: some public API might have been added, not breaking.
D: no public API or breaking changes. only bugfixes inside the current API.

# August 9, 2006 2:09 PM

Paul Gielens said:

These guidelines make sense. We use the exact same protocol with the exception of the build number. The build numbers is increased for every nightly team- or cruisebuild to match the exact nr. of builds executed.
# August 9, 2006 2:40 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 4 and 6 and type the answer here: