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);