Background
WiX & the Windows Installer are completely new to me.
In production, we used an MSI (created using WiX) to install our software. The MSI references a third-party assembly (e.g. OtherCompany.ThirdParty.dll, version 2.5).
The next release of our software must reference an older version of the third-party assembly (e.g. OtherCompany.ThirdParty.dll, version 1.7).
While I understand that installing an older version of a dependency is uncommon, it must happen.
So my question is... how do you configure a MSI (generated by WiX) to use an older version of an assembly without having to completely uninstall the existing package?
Options
We have explored the following:
- Increment the assembly's version
- it's a third party assembly, and
- for traceability this is not an option
- rename the assembly
- the dependency is being retrieved using NuGet... so this won't be straight forward
- force existing install to be completely removed (automatically or manually)
- we don't want configuration information that was collected during the previous installation to be lost, so this isn't an option
- schedule
RemoveExistingProducts
before costing- not recommended by Microsoft (see: MSDN)
- custom action: to delete dependency
- if the installation fails, the application may be left in an undefined state
- override file version in setup
- moving forward, this will be error prone
- changing the REINSTALLMODE
- From the articles that I have read, it appears that this should only be used as a last resort.
- use a WIX companion file
- am still investigating
For Moderators
I am aware that there are other SO posts on this subject. Please note that several of the recommended solutions are incomplete or are error prone.
References
- MSDN: Patching and Upgrades
- MSDN: RemoveExistingProducts Action
- downgrade a library during a msi upgrade
- Why Windows Installer removes files during a major upgrade if they go backwards in version numbers
- MSI Writing Guidelines
- What Every Developer Should Know About MSI Components
- Windows installer deletes versioned file during product upgrade, instead of downgrading it
- MSDN: Windows Installer - File Versioning Rules
- Msiexec REINSTALL=ALL REINSTALLMODE=vamus not reinstalling anything
- good overview of what is happening under-the-hood
- Forcing an upgrade of a file that is modified during its initial installation
- this is an older post is from 2009