how to change file & product version of a exe file

28,543

Solution 1

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.

Solution 2

You can change the Exe Version through an Assembly file. There are 2 options:

1st option is is to edit the assembly file:

 [assembly: AssemblyTitle("TApplciation Name")]
    [assembly: AssemblyDescription("")]
    [assembly: AssemblyConfiguration("")]
    [assembly: AssemblyCompany("")]
    [assembly: AssemblyProduct("")]
    [assembly: AssemblyCopyright("Copyright ©  2015")]
    [assembly: AssemblyTrademark("")]
    [assembly: AssemblyCulture("")]
    [assembly: AssemblyVersion("5.8.3")]
    [assembly: AssemblyFileVersion("5.8.3")]

2nd option is through project Property. Go To Project Property and click on the button which is circled: enter image description here

Change Application Details

Share:
28,543
Admin
Author by

Admin

Updated on July 17, 2022

Comments

  • Admin
    Admin almost 2 years

    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.