none
Unable to uninstall the assembly from GAC which is being used by another application RRS feed

  • Question

  • We have encountered an issue while upgrading our product with .Net Framework 3.5 to latest version with .NET Framework 4.5.1. We came into a situation, where one application is using a logger assembly built with .NET framework 3.5, another application(built on 4.5.1) tries to uninstall same logger assembly which is being used by previous application, but it couldn’t proceed. As it keeps on searching the logger assembly in 4.0 GAC and takes significantly lot more time.

    However above scenario works smoothly where older and newer products are built on .NET Framework 3.5 only.

    Note: Assembly is getting uninstalled by windows installer not by GACUTIL utility.

    Friday, October 17, 2014 10:43 AM

All replies

  • Hello Aher,

    >>However above scenario works smoothly where older and newer products are built on .NET Framework 3.5 only.

    You could try to set useLegacyV2RuntimeActivationPolicy to be true, this is useful your application is built with the .NET Framework 4 but has a dependency on a mixed-mode assembly built with an earlier version of the .NET Framework. For details, you could check this link below:

    http://msdn.microsoft.com/en-us/library/bbx34a2h(v=vs.110).aspx

    If I misunderstand, please let me know.

    Regards,

    Fred.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 20, 2014 6:50 AM
    Moderator
  • Thanks Fred for reply,

    As per my understanding above mentioned attribute can be used when we are trying to reference mixed mode assembly built in 2.0 runtime.

    However the assembly we are using is not mixed mode, its managed and we don't have any problem to reference it from any application.
    Only problem is that we are unable to uninstall it from 4.5.1 MSI while its in use by another application.

    Monday, October 20, 2014 6:50 PM
  • Hello Aher.

    Thanks for your clarification, so it seems that you are only want to uninstall the assembly.

    Please check this blog written by alan, it shows that this issue could be because of the reference count feature. The solution is to modify two registry entries:

    [HKCU\Software\Microsoft\Installer\Assemblies\Global]    
    
    [HKLM\SOFTWARE\Classes\Installer\Assemblies\Global]
    

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, October 21, 2014 6:46 AM
    Moderator
  • Hello Fred,

    Mentioned article refers to the following situation where

     if the same assembly is installed multiple times by different clients, the assembly is not removed until all of the clients that installed the assembly have explicitly requested uninstall

    However this doesn't apply to our case we are trying to uninstall the assembly from same application who has installed it to GAC.

    No other application install or uninstall that assembly.

    • Edited by Aher Santosh Thursday, October 23, 2014 12:14 PM
    Thursday, October 23, 2014 12:12 PM
  • Tuesday, October 28, 2014 7:42 AM