473,543 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ 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.Reflecti on.Assembly MyAssembly =
System.Reflecti on.Assembly.Get ExecutingAssemb ly();
System.Version AppVersion = MyAssembly.GetN ame().Version;
string MyVersion = AppVersion.Majo r.ToString()
+ "." + AppVersion.Mino r.ToString()
+ "." + AppVersion.Buil d.ToString()
+ "." + AppVersion.Revi sion.ToString() ;
Response.Write( "Version: " + MyVersion);
Nov 16 '05 #1
2 4493
You are correct it is:
major_version.m inor_version.bu ild.revision

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

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****@idonotl ikespam.cce.umn .edu> wrote in message
news:%2******** ********@TK2MSF TNGP12.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.Reflecti on.Assembly MyAssembly =
System.Reflecti on.Assembly.Get ExecutingAssemb ly();
System.Version AppVersion = MyAssembly.GetN ame().Version;
string MyVersion = AppVersion.Majo r.ToString()
+ "." + AppVersion.Mino r.ToString()
+ "." + AppVersion.Buil d.ToString()
+ "." + AppVersion.Revi sion.ToString() ;
Response.Write( "Version: " + MyVersion);

Nov 16 '05 #2
You are correct it is:
major_version.m inor_version.bu ild.revision

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

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****@idonotl ikespam.cce.umn .edu> wrote in message
news:%2******** ********@TK2MSF TNGP12.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.Reflecti on.Assembly MyAssembly =
System.Reflecti on.Assembly.Get ExecutingAssemb ly();
System.Version AppVersion = MyAssembly.GetN ame().Version;
string MyVersion = AppVersion.Majo r.ToString()
+ "." + AppVersion.Mino r.ToString()
+ "." + AppVersion.Buil d.ToString()
+ "." + AppVersion.Revi sion.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
2639
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
41687
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 this. Thanks! AF
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 super easy way to leverage build numbers and have them autoincrement, or is this already built in? Either way, is there a programatic way to access...
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 Revision that increment on their own. I could modify the minor and major number above as it made "logical sense". Three related questions:
5
5392
by: cameron | last post by:
Is it possible to get the build date, (not the version), of a dll? -Cam
8
2763
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
1701
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 part number: 3.0.1907.20745 What am I doing wrong, here? I read that the build (1907) and private part (20745) numbers should be set based on the...
2
1608
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
1265
by: moondaddy | last post by:
How do I get all my assemblies to have the same build number? -- moondaddy@nospam.nospam
0
7336
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7582
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7675
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5257
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3384
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
948
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
626
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.