Display Build Version of Application at runtime

  • Thread starter Karsten Grombach
  • 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
 
M

Marc Hoeppner

Hi,

this should work:

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

Best regards,

Marc Höppner
NeoGeo
 
K

Karsten Grombach

hi marc,
in which namespace does AppVersion belong to.
I can't find it in the documentation
regards
karsten
 
K

Karsten Grombach

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top