Problem Description:

Major upgrade for the setup project created in visual studio is not replacing the older files.

I am using an example to explain this issue in a better way:

Using Visual Studio created a Setup Project for an application and versioned it as 1.0. After this upgrade it to Version 2.0 by setting the properties of the setup project “RemovePreviousVersion”=True and “DetectNewerInstalledVerson”=true.

As this is a major upgrade, on installation of upgraded version, version 1.0 is removed from the machine and replaced with Version 2.0. However, when the user launches the Shortcut, it still launches Version 1.0. Also, the version 1.0 exe still exists.  Version 2.0 did not replace it.

Cause: 

This issue is occurring due to file versioning rule; basically in this scenario both the executable have the same version and the same language, that’s why setup project is not able to replace it.

File versioning rules are defined in the following article:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa367835(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa368599(v=vs.85).aspx

Resolution: To fix this issue upgrade the version of the executable through the “Assembly Information Dialog Box”. To access this dialog box, select a project node in Solution Explorer, and then, on the Project menu, click Properties. When the Project Designer appears, click the Application tab. On the Application page, click the Assembly Information button.

clip_image001

After upgrading the assembly version, executable will get replaced (upgrade) successfully.

 

Content by: Keshav Jain