473,480 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Build v. Revision in AssemblyVersion

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);
Nov 16 '05 #1
2 4477
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/de...ilityAlexe.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
mi**@mag37.com
http://www.mag37.com/csharp/
"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:%2****************@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);

Nov 16 '05 #2
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/de...ilityAlexe.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
mi**@mag37.com
http://www.mag37.com/csharp/
"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:%2****************@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);

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2633
by: baylor | last post by:
Is there a way for my EXE to tell when it was built? The idea is to write a copyright date that shows "Copyright 2005-" and then the date the EXE was last built -baylor
9
41679
by: Abe Frohnman | last post by:
I'm wondering how I can access the version info within AssemblyInfo.cs in my program? I'd like to output the version of my program in a text label but I can't find any clear examples on how to do...
5
350
by: Aaron | last post by:
How does the build number works? right now my assembly is version 1.0.1235.33799 it doesn't change when i re-compiled it. Thanks.
1
286
by: Mark | last post by:
We have 5 developers working on two shared ASP.NET projects. We're using VS.NET 2003 with Visual Source Safe. We'd like to track build numbers, but have NEVER touched this before. What is a...
2
514
by: Mark | last post by:
In the AssemblyInfo.cs page of a ASP.NET project, there is a defaulted property of: It's my understanding that this indicates a Major Version of 1, a Minor Version of 0, and a Build and...
5
5366
by: cameron | last post by:
Is it possible to get the build date, (not the version), of a dll? -Cam
8
2753
by: S. HP | last post by:
How can I make a build number that increases for each build automatically in a ASP.NET project, as I used to have in VB 6.0 ? Regards, SAHP
3
1698
by: Michael Kellogg | last post by:
In my project's "AssemblyInfo.vb" file, I have set the following for versioning: <Assembly: AssemblyVersion("3.0.*")> Yet every time I rebuild, I get the exact same build number and private...
2
1605
by: moondaddy | last post by:
How would I get the version and build number while the app is running? Whats the standard way of getting this info for an app's about window? -- moondaddy@nospam.nospam
4
1259
by: moondaddy | last post by:
How do I get all my assemblies to have the same build number? -- moondaddy@nospam.nospam
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7048
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7088
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5342
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4783
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2986
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.