简体   繁体   中英

How to downgrade program by visual studio setup project?

I have program on C#. I create VS Setup for this project. First of all i create setup for version 1.0.0, then i create for 1.0.1.

In Setup Properties I check DetectNewerInstalledVersion to false, and RemovePreviousVersion to true.

在此处输入图片说明

After install 1.0.0 I try to Upgrade to 1.0.1 by run setup v. 1.0.1. It`s finish success. But when I try to downgrade to 1.0.0 it`s install me to regedit 2 positions (I mean 1.0.0 and 1.0.1), and in application folder left 1.0.1, not 1.0.0. How to downgrade program from 1.0.1 to 1.0.0 in one step - install 1.0.0?

There's no support for this in Visual Studio setups. I suspect that in most situations going back to an earlier version is unusual, so a manual uninstall of the newer one would be done first.

That means you need to use another tool that supports downgrades (I know WiX does) or edit the MSI file (with Orca from the Windows kit) as follows:

Open the MSI file and go to the Upgrade table. Delete the 1.0.1 (or whatever) is in the VersionMax column. Add a 0 to the VersionMin column, then save the file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM