469,593 Members | 1,901 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,593 developers. It's quick & easy.

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 6553
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: AssemblyVersionAttribute Constructor
http://msdn.microsoft.com/library/en-
us/cpref/html/frlrfsystemreflectionassemblyversionattributeclass ctortopi
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.Build.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mark | last post: by
4 posts views Thread by Matthew Smith | last post: by
7 posts views Thread by Martin Bischoff | last post: by
7 posts views Thread by Michael Maes | last post: by
3 posts views Thread by AnthonyWJones | last post: by
3 posts views Thread by MattB | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.