Join GitHub today
COM+ .NET assembly upgrade works not correctly #5679
WixComPlusExtension uses RegistrationHelper class (System.EnterpriseServices.dll) to install and uninstall .NET COM+ assemblies. Let's have a look at steps happening during the upgrade:
Everything seems fine. Let's note some significant facts:
Now let's expand the steps that happen during the upgrade:
Note that this is possible during upgrading because the upgrading is done in the scope of the same process and App Domain created in the first step is not unloading until the process is done.
How to resolve
WixComPlusExtension has another significant issue - it doesn't register .NET 4.0 (and higher) assemblies, because by default it loads CLR of version 2 that cannot load 4.0 assemblies into an App Domain. I think the issues could be resolved if registration/unregistration commands run in a separate process that would load correct version of CLR and would unload immediately after registration/unregistration is done.