Re: Build v. Revision in AssemblyVersion

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Michael Mayer [C# MVP] (mike_at_mag37.com)
Date: 04/10/04


Date: Fri, 9 Apr 2004 20:06:36 -0500

You are correct it is:
major_version.minor_version.build.revision

Here is the definition of how build and revision are calculated (when you
leave * in the AssemblyVersionAttribute)

FROM:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfAssemblyGenerationUtilityAlexe.asp

If you specify major and minor, you can specify an asterisk (*)for build.
This causes build to be equal to the number of days since January 1, 2000,
local time, and revision to be equal to the number of seconds since
midnight, January 1, 2000, local time, divided by 2.

-- 
Mike Mayer, C# MVP
mike@mag37.com
http://www.mag37.com/csharp/
"Mark" <mfield@idonotlikespam.cce.umn.edu> wrote in message
news:%233wlQ9BHEHA.3904@TK2MSFTNGP12.phx.gbl...
> In the AssemblyInfo.cs page of a ASP.NET project, there is a defaulted
> property of:
>
> [assembly: AssemblyVersion("1.0.*")]
>
> It's my understanding that this indicates a Major Version of 1, a Minor
> Version of 0, and a Build and Revision that increment on their own.  I
could
> modify the minor and major number above as it made "logical sense".  Three
> related questions:
>
> 1. Under what circumstances does the Build automatically increment?
> 2. Why does the revision increment by a 100+ each time I rebuild my
> solution?  Why not ... by one?
> 3. Will the code below display the correct related information ... or am I
> misinterpreting their meaning by displaying them in this way (for internal
> purposes)?
>
> Thanks in advance!
> Mark
>
> System.Reflection.Assembly MyAssembly =
> System.Reflection.Assembly.GetExecutingAssembly();
> System.Version AppVersion = MyAssembly.GetName().Version;
> string MyVersion = AppVersion.Major.ToString()
>     + "." + AppVersion.Minor.ToString()
>     + "." + AppVersion.Build.ToString()
>     + "." + AppVersion.Revision.ToString();
> Response.Write("Version: " + MyVersion);
>
>


Relevant Pages

  • AssemblyVersion
    ... and a Build and Revision that increment on their own. ... Will the code below display the correct related information ... ... string MyVersion = AppVersion.Major.ToString ...
    (microsoft.public.dotnet.languages.csharp)
  • Build v. Revision in AssemblyVersion
    ... and a Build and Revision that increment on their own. ... Will the code below display the correct related information ... ... string MyVersion = AppVersion.Major.ToString ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Auto Increment records like a new emplyee number
    ... You'd use your other info for display. ... "TonySper" wrote in message ... > contains your id counter, increment it, and then unlock the record. ... >> As long as everyone attempts to lock the table before counting, ...
    (microsoft.public.fox.programmer.exchange)
  • Re: wrong bloody time on dot Mac emails (american time)
    ... why did James email me at 4.30 am this morning. ... Their web server doesn't know what timezone your web browser is in, ... going to be hard to display a "local" time for you. ... mail (their local time), the times for whatever mail servers the mail went ...
    (uk.comp.sys.mac)
  • Re: IST for system, local time for people
    ... I want to display a clock for my purposes set to my local time. ...
    (Fedora)