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

GAC Reference Counts and preventing assemblies from removal


1 reply to this topic

deramor

deramor
  • Full Members
  • 187 posts

Posted 23 January 2014 - 17:33

Hello all.

 

Some time ago, my company started releasing native 64-bit products.  At that time, I took the opportunity to overhaul our installers.  In particular, the native 64-bit installers are now Basic MSI project types.  The old installers were all Installscript MSI projects.

 

We have noticed a difference in behavior between the two project types.

With installers generated by Installscript MSI projects, Assemblies installed to the GAC are unable to be uninstalled by any method.  This is expected behavior.  The following Microsoft blog post describes the behavior better than I did. http://blogs.msdn.co...2/10/42690.aspx

 

Conversely, installers that were generated by Basic MSI projects do not have this behavior.  I can freely uninstall assemblies from the GAC using gacutil (and so can customers).

 

Does anyone know of a reason for this?

Does anyone know how I can author the Basic MSI projects to install the correct registry keys to "lock" the assemblies?

 

Regards



deramor

deramor
  • Full Members
  • 187 posts

Posted 27 January 2014 - 20:48

As it turns out, by selecting "Always overwrite" for assemblies installed to the GAC, the reference was never made and thus the assembly was never locked.  Any idea why overriding the version number would prevent the reference from being made?