473,395 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Get version and build number while app is running

How would I get the version and build number while the app is running?
Whats the standard way of getting this info for an app's about window?

--
mo*******@nospam.nospam
Feb 8 '06 #1
2 1602
Hello, moondaddy!

m> How would I get the version and build number while the app is running?
m> Whats the standard way of getting this info for an app's about window?

System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version;

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 8 '06 #2
Hi

We can use the reflection to get the current running assembly and get its
version

================================================== ====================
// Version information for an assembly consists of the following four
values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.2.3.4")]
================================================== ====================

private void button1_Click(object sender, EventArgs e)
{
string v =
Assembly.GetExecutingAssembly().GetName().Version. ToString();
MessageBox.Show(v);
}
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 8 '06 #3

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

Similar topics

5
by: mekim | last post by:
Hello....I am trying to System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version.ToString () ; to display the version of the app...but it remains static and therefore does not...
8
by: John | last post by:
Hi How can I change the product version number that is returned by Application.ProductVersion? Thanks Regards
6
by: Gavin Sullivan | last post by:
I've been using the date (in YMMDD) format for the build number in the AssemblyVersion attribute. However, it appears that numbers 65534 are invalid!! Bit of a bummer for 2007!!! Is there a...
1
by: ewingate | last post by:
I cannot seem to get the version number of my VB app to increment properly in VS2005. When I build the app each day the "build" number increments with no problem as does the version number but if I...
7
by: John Nagle | last post by:
Back in March, I posted this: That was for M2Crypto 0.17. It's still broken in M2Crypto 0.18. And there's no RPM or Windows binary. Nobody actually uses this stuff, do they?
6
by: Aussie Rules | last post by:
Hi, I use the publish feature within Vs.net 2008, and have it set to increment on each build/publish I want to be able to display this as my application version number, but can not see how to...
0
by: newbie73 | last post by:
OS: Vista Python 2.5.2.2 (ActiveState Software Installation) Running latest Cygwin release The error generated is pasted below - please help. - Luis ***************************************
2
by: Paul McNett | last post by:
Anyone have anything to suggest on this error: {{{ Traceback (most recent call last): File "shutter_studio.py", line 41, in <module> File "App.pyo", line 25, in <module> File...
5
dlite922
by: dlite922 | last post by:
Hey guys, I've built applications and I've always wanted my own version and build number that's more like bigger applications. Requirements: 1. The version should be manual (besides...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.