Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the proper way to handle assembly version?

I am looking forward to implementing a daily build for an upcoming project.

But before doing that, I need to know how to properly version an assembly.

I have the following concerns:

  • Should each assembly have an independent version number or should they all share the same version?
  • Should I use a * version for build and revision?
  • Is revision relevant to daily build?
like image 490
Pierre-Alain Vigeant Avatar asked Sep 10 '09 00:09

Pierre-Alain Vigeant


People also ask

What is the order of an assembly version?

Version information for an assembly consists of the following four values : a major and minor version number, and two further optional build and revision numbers. This should only change when there is a small changes to existing features.

Where do I put assembly version?

You can set the assembly version using the AssemblyVersionAttribute. Assembly attributes are usually applied in the AssemblyInfo. cs file as stated in the other answers.

What is assembly versioning explain with example?

Assembly version number For example, version 1.5. 1254.0 indicates 1 as the major version, 5 as the minor version, 1254 as the build number, and 0 as the revision number.

What is the difference between assembly version and file version?

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.


1 Answers

We stamp all the assemblies within our products with the same version number using the following steps:

  • Link all assemblies to an AssemblyInfoCommon.cs containing the version number info: see here for an example.

  • Generate the AssemblyInfoCommon.cs file as part of the build using (in our case) the NAnt asminfo task, Cruise Control .NET and the SVN revision labeller

In our case, we don't use the * version. All deployed versions are built on the build server. We don't worry about version number on our desktops.

like image 92
Joe Field Avatar answered Oct 05 '22 22:10

Joe Field