Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way to automatically increment the Version number of my Setup project? I often forget to manually bump the number, and running the installer alerts the user that they have to first uninstall the existing app to install the new version, which is annoying.

Any suggestions or links to other resources would be great. Thanks.

What I have tried:

Dont know what to do. Please give suggestions as i am new to this
Posted
Updated 3-Sep-19 6:15am

You mod the AssemblyInfo.cs file for EACH project in your solution; that is, each project that should be "in sync".

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers 
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "1.0.0.0" )]
[assembly: AssemblyFileVersion( "1.0.0.0" )]
[assembly: ComVisible( false )]


Setting Assembly Attributes | Microsoft Docs[^]
 
Share this answer
 
Comments
Member 13458729 4-Sep-19 1:54am    
Thanks for the insight, but I still haven't quite found what I'm looking for. I've tried your suggestions for adding to my AssemblyInfo.cs file, but it seems like those things only increment the version of the produced dll.

As I've mentioned, I need to be able to update the version number specifically for my Setup project, which creates my MSI and EXE files.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900