Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Effective way to manage revision number

Tags:

c#

C# 2008 SP1

I am wondering what is the best way to handle revision numbers.

I had always thought there is normally only 3 numbers. (Major, Minor, and Bug fixes).

However, I am left wondering what the build number is and the Revision number.

For example, in the past I have normally used only 3 numbers. I there is some very minor change or a bug fix I would increment the 3rd number (bug fixes).

Because I am new to this. What is normally done in the professional world?

Many thanks for any advice,

In my AssemblyInfo file I have the following:

// 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.2.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]

// 1.0.2 Added feature for detecting if a sound card is installed.
like image 930
ant2009 Avatar asked May 28 '09 07:05

ant2009


2 Answers

From MSDN:

  • Build : A difference in build number represents a recompilation of the same source. This would be appropriate because of processor, platform, or compiler changes.

  • Revision : Assemblies with the same name, major, and minor version numbers but different revisions are intended to be fully interchangeable. This would be appropriate to fix a security hole in a previously released assembly.

Phil Haack has a nice deconstruction of the .NET versioning system, but in practice I don't think his concerns really matter since in my experience the .NET/MS versioning system is only really used by technical for debugging/support/tracking purposes, the public and project management will often be date or made-up-marketing-version-number based.

FWIW every .NET project I've worked on ha been governed by "X.Y.*" i.e. we like to manually control what the major and minors are but let the system control the build and revision.

like image 78
annakata Avatar answered Oct 21 '22 01:10

annakata


Try this:

http://autobuildversion.codeplex.com/

like image 45
jrista Avatar answered Oct 21 '22 02:10

jrista