473,671 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6729
Mark wrote:
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:


See: AssemblyVersion Attribute Constructor
http://msdn.microsoft.com/library/en-
us/cpref/html/frlrfsystemrefl ectionassemblyv ersionattribute classctortopi
c.a
sp

<msdn>
The format of the version string is: major. minor. build. revision.

When specifying a version, you have to at least specify major. If you
specify major and minor, you can specify an asterisk (*) for build. This
will cause build to be equal to the number of days since January 1, 2000
local time, and for revision to be equal to the number of seconds since
midnight local time, divided by 2.

If you specify major, minor, and build, you can specify an asterisk for
revision. This will cause revision to be equal to the number of seconds
since midnight local time, divided by 2.
</msdn>
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
Nov 16 '05 #2
Format is Major.Minor.Bui ld.Revision. When the compiler generates Build
or Revision numbers, Build is the number of days since Jan 1, 2000 in
local time, Revision is number of seconds since the previous midnight in
local time MOD 2.

margaret

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

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

Similar topics

0
274
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:
4
8076
by: Matthew Smith | last post by:
Is there a way to get the value that is stored in the AssemblyVersion attribute that's in AssemblyInfo.cs?
1
5100
by: | last post by:
In C#, when one specifies an assembly attribute for the Assembly version, this becomes the file version as well. In Managed C++, there appears to be no relation between the assembly attribute and the file version. In fact, unless one specifies a version resource, no version attribute will be generated at all. Does anyone know a way to make the AssemblyVersion attribute generate a FileVersion as it does in C#. Thanks,
7
6131
by: Martin Bischoff | last post by:
How can I set the assembly version in an ASP.NET 2.0 project? I have added a file AssemblyInfo.cs containing the version number to my project's App_Code folder. When I try to read the version number from my code I always get "0.0.0.0". In ASP.NET 1.1 I was able to read the version of my web application using the same code. Thanks for any help, Martin
7
16354
by: Michael Maes | last post by:
Hi, Setting the Assembly Version is no problem (<Assembly: AssemblyVersion("1.1.20043.13")>) but how do I set the FileVersion (of the dll)? TIA, Michael
3
1748
by: AnthonyWJones | last post by:
I see from my searches that this has be discussed before. However I can find no satisfactory answer or any reference to this problem being a bug. From the MSDN documentation for this attribute:- A version number such as specifies 1 as the major version, 2 as the minor version, accepts the default build number, and specifies 6 as the revision number.
3
38209
by: herc | last post by:
How does one get the AssemblyVersion of the currently excuting assembly? At first glance, it would appear that this would give you the AsseblyName which will give you the version: string appName = AppDomain.CurrentDomain.SetupInformation.ApplicationName; AssemblyName assemblyName = AssemblyName.GetAssemblyName(appName); But the appname is <name>.vshost.exe. Is there any way to find out the name of the assembly minus the vshost?
3
1431
by: MattB | last post by:
I searched around a little and I don;t see how I can get the AssemblyVersion of the main assembly of my asp.net 1.1 application. Can anyone point me to an example? I want to be able to display this in the application. Thanks! Matt
0
936
by: Dilip | last post by:
I have a weird problem with versioning one of my C# binaries. I have the usual AssemblyVersion/AssemblyFileVersion attributes set. When I use reflector to poke into the compiled binary I can find all the version/company information being set correctly. However I am seeing a confusing issue when I right click on this binary and click the Properties option from the context menu: On XP: the Version tab is altogether absent On Vista:...
0
8402
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8927
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8825
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8605
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 most users, this new feature is actually very convenient. If you want to control the update process,...
1
6237
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5703
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.