473,387 Members | 1,512 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,387 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 4472
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...

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.