Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Problems with major upgrades with assemblies


5 replies to this topic

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 12 July 2012 - 07:41

Hello,

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:
http://support.microsoft.com/kb/905238

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.

Thanks,
Kiran Hegde




Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 July 2012 - 20:11

Have you tried placing RemoveExistingProducts right before InstallFinalize? In this case, if the uninstall of the old version fails, everything rolls back.

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 13 July 2012 - 05:23

I guess that would not have any effect . Reason being, the costing process decides that a component would not have to be re-installed if the underlying assembly version of the assembly in a component does not change over releases.
As a result of this, the files would still go missing from the GAC.

http://support.microsoft.com/kb/905238

Do let me know as to what would be the best way to tackle this issue.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 July 2012 - 10:54

Yes, I think you're right. Sorry for the confusion. So I guess that leaves you with the options you already know...

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 17 July 2012 - 14:57

Hello Stefan,

Which among the above would be the better?
Kindly suggest.

Regards,
Kiran Hegde

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 July 2012 - 10:24

In my opinion, ii) sounds like a good solution. How likely is a failing uninstall anyway? And if, you can still manually uninstall the old version from control panel.