473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 4465
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
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
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
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
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
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
by: cameron | last post by:
Is it possible to get the build date, (not the version), of a dll? -Cam
8
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
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
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
by: moondaddy | last post by:
How do I get all my assemblies to have the same build number? -- moondaddy@nospam.nospam
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.