Wix installer removing file meant to be updated but not installing new version

480 Views Asked by At

Recently ran into an issue with a Wix installer configured to be a "major upgrade" for an application previously installed. The application already installed on the system included an S7.Net.dll file with version 1.0.0, while the installer - meant to represent an update - included a dll of the same name (S7.Net.dll) but with a version of 0.3.0 to be installed at the same location. However, running the "upgrade" installer seemed to remove the file versioned 1.0.0 but never replaced it with the one versioned 0.3.0.

I have looked into the file versioning logic used by the installer (link), and if I understand it correctly, the installer should not have replaced the file already installed on the system (v1.0.0) with the one from the "upgrade" installer (v0.3.0). Is this understanding correct? I am uncertain about this given the fact that the "upgrade" installer does include a MajorUpgrade component, which from my understanding performs a sort of "remove all" action by default - at least this is what I interpreted from reading the description for the RemoveFeatures property in the Wix documentation. But if a "remove all" is performed, then why would the versions of the two files still ever be compared?

Overall, is my understanding of the file versioning logic correct? How about my understanding of the RemoveFeatures property of the MajorUpgrade Wix component? And if so, why would the "upgrade" installer remove the existing version of the file but not replace it?

I have included the MajorUpgrade component included in the installer, as well as screenshots of the properties tab for each of the dll files mentioned.

<MajorUpgrade AllowDowngrades="no" DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>

Properties of existing file v1.0.0.0

Properties of updated file v0.3.0

0

There are 0 best solutions below