473,395 Members | 1,641 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.

Getting exe version info

Hi, have a real simple question but i cant find the answer in the
docs... i would like to get my c# exe's version info so i can display
on a splash screen and in the about box.

i have looked at stuff on assembilies and reflection but cant make much
headway with it. Any help much appreciated.

Cheers,

Chris

Nov 16 '05 #1
3 11354
Chris,
Assembly.GetExecutingAssembly().GetName().Version. ToString()

Jason Newell, MCAD
Software Engineer
<g1**@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi, have a real simple question but i cant find the answer in the
docs... i would like to get my c# exe's version info so i can display
on a splash screen and in the about box.

i have looked at stuff on assembilies and reflection but cant make much
headway with it. Any help much appreciated.

Cheers,

Chris

Nov 16 '05 #2
Chris,

Assuming your executable is the entry point for the application, you can
easily get the assembly, then the version, like this:

// Get the entry point.
Assembly entryPoint = Assembly.GetEntryAssembly();

// Get the name of the assembly.
AssemblyName entryPointName = entryPoint.GetName();

// Get the version.
Version entryPointVersion = entryPointName.Version;

Then you can do what you wish with the version.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<g1**@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi, have a real simple question but i cant find the answer in the
docs... i would like to get my c# exe's version info so i can display
on a splash screen and in the about box.

i have looked at stuff on assembilies and reflection but cant make much
headway with it. Any help much appreciated.

Cheers,

Chris

Nov 16 '05 #3
Try
Application.ProductVersion.ToString();
<g1**@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi, have a real simple question but i cant find the answer in the
docs... i would like to get my c# exe's version info so i can display
on a splash screen and in the about box.

i have looked at stuff on assembilies and reflection but cant make much
headway with it. Any help much appreciated.

Cheers,

Chris

Nov 16 '05 #4

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

Similar topics

0
by: EMW | last post by:
Hi, I just started on my very first .NET application and it is for my pocket pc. I managed to create my forms and show then when I want to, but there are two things I cannot seem to find: 1)...
2
by: Dave Cullen | last post by:
Is there a C# equivalent of the Version Info resource found in VC++ 6.0? Thanks
0
by: Kurt Ng | last post by:
Hi, y'all. I am working on retrieving file version info on a third party dll. I have used the FileVersionInfo class to retrieve all of the standard version information already such as...
2
by: Lee | last post by:
Hi All, I need to put the program version info into it's about box. How do I get the various version number (major, minor, rev, etc, etc) I have tried this (major part only) but am getting a...
1
by: José Joye | last post by:
I have created a VC project (which will create a DLL). It is using managed extension. It also has a ConfigData.cpp. In that file I have the following: ; However, it does not write any version...
6
by: Boris | last post by:
I have taken over a project which when compiled creates a DLL which has no version info tab. When you do a right-click with your mouse on the DLL file there is no version info. I checked some other...
5
by: Brian Henry | last post by:
If you want to read in the description/version/copyright of a file (any not necessarly a .NET one) how would you do this? I just want to list all the files in a directory and their version numbers...
1
by: kpg | last post by:
Hi All, I have an asp.net project that uses an ActiveX component on the server side and I would like the login page to show the version number of this component. The ActiveX component is...
7
by: jeffc | last post by:
Not sure exactly what my question is or what forum to ask on. I know how to get version info from a particular file. e.g. FileVersionInfo.GetVersionInfo(filePath) What I'd like to do is get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.