Solved

C# executable version

Posted on 2004-10-04
4
283 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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…

786 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