?
Solved

How to Manually Change Assembly Version Number of an Existing EXE Program?

Posted on 2011-04-26
3
Medium Priority
?
867 Views
Last Modified: 2012-06-27
I would like to know if there is a way for me to manually change the Assembly Version Number of an EXE program.  I want Visual Studio to automatically change the Assembly Version Number for me whenever I rebuild the EXE program.  But in some occasions, I need the EXE program to have a specific version number.  This means I want to be able to change the Assembly Version Number of the EXE file.  But the Assembly Version number field of the file properties is read-only.  Is there a way to change it?

Thanks.
0
Comment
Question by:homerslmpson
3 Comments
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 500 total points
ID: 35469589
In the Properties folder there is a file called AssemblyInfo.cs.  You can set the version in the following lines:
[assembly: AssemblyVersion( "1.0.0.0" )]
[assembly: AssemblyFileVersion( "1.0.0.0" )]
0
 
LVL 33

Expert Comment

by:Todd Gerbert
ID: 35469659
Or right-click your project, choose properties, then click the "Assembly Information" button on the "Application" tab.  Specifying version numbers here is identical to doing it manually as Dan7el already suggested; if you use a "*" in one of the two right-most positions of the Assembly Version then Visual Studio will automatically increment it for you (if you use a "*" in the second-to-last position, then last one must be empty).
Untitled.png
0
 
LVL 1

Author Closing Comment

by:homerslmpson
ID: 35469913
Thanks for the confirmation.

Actually I already know that I can assign a version number to a _new_ EXE file by changing the Assembly Version property in the AssemblyInfo.cs program file.  I was just hoping that I didn't need to mess with the AssemblyInfo.cs file and could go directly to change the version number in an _existing_ EXE file.  If this cannot be done, I will accept this and move on instead of procastinating.  Thanks.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Six Sigma Control Plans

839 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