Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change file & product version of a exe file

Tags:

I am using Microsoft Visual C# 2010 Express. I have to change the version of my exe file. Please tell me how to do it, either by my C# code, or by batch file.

like image 750
Ranger Avatar asked Jul 09 '13 13:07

Ranger


People also ask

How do I change the file type?

You can also do it by right-clicking on the unopened file and clicking on the “Rename” option. Simply change the extension to whatever file format you want and your computer will do the conversion work for you.

How do I change a file type in Windows 10?

When you find the file, right click it. Select the rename option from the menu, and then type the new file extension. Step 4: Then there will pop up a warning window on the page. If you confirm to change it, click Yes to finish the operation.

How do I change a file to all files?

To change a whole batch of files at once: Select each of the files. You can select a group of contiguous files by click the first one and then Shift+clicking the last one; you can select any number of files by Ctrl+clicking each file; or to select all files in a folder, press Ctrl+A.


1 Answers

Somewhere in your code (favorably in AssemblyInfo.cs in the Properties folder of your project), put this:

[assembly: AssemblyVersion("1.0.0.0")] 

Also possible is the file version attribute:

[assembly: AssemblyFileVersion("1.0.0.0")] 

Make sure that you only have one instance of AssemblyVersion and/or AssemblyFileVersion attributes in a single assembly - everything else won't compile.

like image 95
Basuro Avatar answered Oct 06 '22 11:10

Basuro