Solved

C# executable version

Posted on 2004-10-04
4
285 Views
Last Modified: 2008-02-01
Hi,

I am using VS 2003 to write a C# smart device application.  What do I have to do so that when I check the properties of the exe generated, I can see a version number other than 0.0.0.0?  Also, how can I obtain the version at runtime?

Thank you,
Joe
0
Comment
Question by:joeslow
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
BlackTigerX earned 125 total points
ID: 12223564
look at the assemblyInfo.cs (in the solution explorer) file of your project, you'll see all the information you need there, and it explains how to activate it
0
 
LVL 20

Assisted Solution

by:ihenry
ihenry earned 125 total points
ID: 12223673
Try this,

System.Version ver = Assembly.GetExecutingAssembly().GetName().Version;
int b = ver.Build;      // 1740
int m = ver.Major;      // 1
int n = ver.Minor;      // 0
int r = ver.Revision;      // 21027
string verNum = ver.ToString();      // 1.0.1740.21027
0
 

Author Comment

by:joeslow
ID: 12226972
Hi,

I can see the AssemblyInfo.cs in a normal desktop application but not on my smart device application (.netcf).  Any ideas on how to do it there?

Thanks,
Joe
0
 

Author Comment

by:joeslow
ID: 12228543
Hi,

Thanks for your help.  I ended up just copying an AssemblyInfo.cs from another project to the .netcf one and added it.  Then I can set the version info there.

Joe
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question