Display Build Version of Application at runtime

  • Thread starter Thread starter Karsten Grombach
  • Start date Start date
K

Karsten Grombach

How can I display the current build version of my webapplication at runtime?
i.e. the version I set in my web deployment project.

regards and thanks
karsten
 
Hi,

this should work:

string MyVersion = AppVersion.Major.ToString() + "." +
AppVersion.Minor.ToString() + "." + AppVersion.Revision.ToString();

Best regards,

Marc Höppner
NeoGeo
 
hi marc,
in which namespace does AppVersion belong to.
I can't find it in the documentation
regards
karsten
 
thanks :)
Marc Hoeppner said:
Oops, sorry. Apparently I posted only 1 of the 3 lines I wanted to post.
here is the rest:

System.Reflection.Assembly MyAssembly =
System.Reflection.Assembly.GetExecutingAssembly();

System.Version AppVersion = MyAssembly.GetName().Version;

string MyVersion = AppVersion.Major.ToString() + "." +
AppVersion.Minor.ToString() + "." + AppVersion.Revision.ToString();
 
Back
Top