views:

129

answers:

5

Hi, we will find Assembly version from Assembly.cs in every library.

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

My question is what is 1.0.0.0 meant by this?

Thanks

+1  A: 

major version. minor version. build number. revision

Jeeva S
Thanks.........
Muhammad Akhtar
+1  A: 

From AssemblyInfo.cs, the four numbers mean:

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
JLWarlow
Thanks..............
Muhammad Akhtar
+2  A: 

As stated in the file itself:

// 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")]

By changing this the following way:

// 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")]

You'll get an auto set of the last two sections (Build Number and Revision). And this auto-increment works as follows:

  • Build Number: Days since 1.1.2000
  • Revision: Seconds since midnight

And last but not least if you use Subversion for SourceControl you can create a template file (copy of the same file with other name) where you replace on a desired place something like this:

[assembly: AssemblyVersion("1.0.$WCREV$.0")]

And within your pre-built event of your project you'll enter something like this:

SubWCRev "$(ProjectDir)\" "$(ProjectDir)Properties\AssemblyInfo.template.cs" "$(ProjectDir)Properties\AssemblyInfo.cs"

To get your current Subversion revision number into the version information of your application.

Oliver
Thanks Oliver..
Muhammad Akhtar
+1  A: 

The version number is made up of four segments; Major, Minor, Build and Revision.

The first two segment Major and Minor are the version number that the user will normally see, major changes are for very large change, whilst minor are incremented for each brand new release to the user.

The second two segments Build and Revision are an extension to the version number that are really for IT people. By default these are the number of days since a random, designated start date, and the revision based on the number of seconds since midnight.

We actually use a version of the date for the build value and releases within a single day for the revision (although we will probably move this to being our svn revision number).

Iain Hoult
Thanks...........
Muhammad Akhtar
+2  A: 

please refer to this link http://msdn.microsoft.com/en-us/library/51ket42z(VS.71).aspx

Venkat
Thanks..........
Muhammad Akhtar