Reputation: 407
I have a standard windows forms application that is being deployed using the VS2017 setup project. When opening the setup project using the "File System", I added to the application folder the following:
EPPlus
library's dll.The setup project gives the output .msi
package just fine. The problem is, when I run the .msi
output after building the setup project (of course after building the source project) and run the application, I do not see my updates, even the files on C:\Program Files ....
directory are not modified. I tried changing the product code and the increasing the version and it does not work. My questions are:
Thank you very much.
Upvotes: 0
Views: 3097
Reputation: 20780
The way you do the upgrade is to use the RemovePreviousVersions project setting. The steps are:
The resulting MSI will do a major upgrade (in Windows Installer terminology) and upgrade the older version, replacing it with your new product MSI. Note that an upgrade will work only with the same context of install. An Everyone will not upgrade a Just me, so that will result in two entries in Programs and Features. Doing the install creating a verbose log and searching foe FindRelatedProducts entries will tell you if it found the upgrade or not. msiexec /I [path to msi file] /l*vx [path to a text log file]
There's a longer explanation here: https://www.red-gate.com/simple-talk/dotnet/visual-studio/updates-to-setup-projects/?_ga=2.138201520.1662048302.1514485579-1682631157.1514485579
which is old but relevant. and doesn't mention the requirement to update binary file versions (it wasn't needed with early VS setup projects).
Upvotes: 6