Problems with major upgrades with assemblies
Posted 12 July 2012 - 07:41
We have a msi package which installs assemblies into the GAC. We use major upgrades to update our products. In the updated package, we sequence the RemoveExistingProducts standard action , right after InstallInitialize.
However, this is resulting in a problem where the files are missing from the GAC after an upgrade. This problem has been described here:
To overcome this issue, there are multiple approaches:
i)Increment the assembly version of the files which go into the GAC with every upgrade.
This is not an option for us , as these files are sourced from Merge Modules, which are owned by completely different teams. Additionally, the merge modules need a rebuild for the assembly version to be incremented. Since these files do not change across releases, rebuilding Merge Modules just for the sake of incrementing Assembly versions is not an option.
ii)Sequence RemoveExistingProducts after InstallFinalize
However, this comes associated with a risk that if the uninstall of the older product fails, we will be left with 2 products registered on the system. hence, we would like to avoid this option.Additionally, doing this is also resulting in numerous uninstallaiton issues with shared components as described in :http://blogs.msdn.com/b/heaths/archive/2010/04/09/major-upgrades-with-shared-components.aspx
A lot of resources are not cleaned up after an uninstall.
iii)Change the component GUID of the components which install into the GAC with every upgrade.
This though seems to work, i am not sure if this is a good solution. As per the MSDN recommendation, you should change the component GUID only when the location or the key path changes. Since this is not the case here, i am a bit hesitant to adopt this approach.
iv)Have the REINSTALLMODE=emus property set in the property table.
I wanted to know as to what is the recommended solution here?
I am hesitant to use solutions ii) and iii).
Are there any other safe solutions which we could make use of?
Any help would be very much appreciated.
Posted 12 July 2012 - 20:11
Posted 13 July 2012 - 05:23
As a result of this, the files would still go missing from the GAC.
Do let me know as to what would be the best way to tackle this issue.
Posted 17 July 2012 - 14:57
Which among the above would be the better?
Posted 20 July 2012 - 10:24