How to create a build version in .NET?

Possible Duplicate:
Assembly Version Details

How to create a build version in VS / .NET? I know that there are several lines in AssemblyInfo.cs or AssemblyInfo.vb with something like this:

' 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")> 

But how is the final build created? How does it increase? Where is the last value stored? We have a regular internal release environment, and I would like to customize the build version ... I searched google but couldn't find anything ... Any pointers?

+5
source share
4 answers

Take a look at the AssemblyInfo task if you don't like the built-in behavior!

http://archive.msdn.microsoft.com/AssemblyInfoTaskvers

+1
source

"1.0. *" Assembly, :

  • : 1 ( )
  • : 0 ( )
  • : 01.01.2000.
  • : 12:00 (UTC?)

, ...

+5

, . - 1 2000 . - ( ), .

MSDN

... build 1 2000 , , , , 2.

+3

Just generate a file containing the version as you need, at least for official builds. Having a version other than assemblies coming from the same “assembly” is confusing.

You may also need more control over the version to find out if there is an assembly from any machine or any official assembly.

Another consideration: if you have a public API of any type and the need for backward or forward compatibility, auto-generation of a version will make it almost impossible.

0
source

All Articles