• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 884
  • Last Modified:

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

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
homerslmpson
Asked:
homerslmpson
1 Solution
 
Daniel Van Der WerkenIndependent ConsultantCommented:
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
 
Todd GerbertIT ConsultantCommented:
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
 
homerslmpsonAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now