Unable to uninstall an Assembly from GAC?

22,094

Solution 1

Have you considered reading this KB article and trying it out?

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To work around this problem, examine the list of values for the following subkeys in Registry Editor:

HKEY_CURRENT_USER\Software\Microsoft\Installer\Assemblies\Global HKEY_LOCAL_MACHINE\Software\Classes\Installer\Assemblies\Global

If the value for the entry is a Windows Installer descriptor, delete the entry. For example, the value might be a cryptic REG_MULTI_SZ entry that resembles the following: =ysgSC6wx9uiD1dqmmjW>m$!GP^D'A@?z}gn3}lta

Note You must delete the entry. Do not just clear the value of the entry.

Solution 2

The most likely cause of this is that you have installed the log4net assembly via a Windows Installer (msi-package). If that is the case, try to uninstall it using Add/Remove programs.

Solution 3

The following steps helped me to remove Microsoft.ReportViewer.Common,Version=12.0.0,PublicKeyToken=89845dcd8080cc91 from gac

cd %systemroot%\assembly\

From here you may have more that one "gac" directory, so you will have to search within each to find your component.

cd gac_msil
cd <assembly DLL name>
cd <assembly version number>__<public key token>

For example: 12.0.0.0__89845dcd8080cc91

erase *.*

Say "y" to "are you sure".

cd ..
rd <assembly version number>__<public key token>
cd ..
rd <assembly DLL name>
Share:
22,094

Related videos on Youtube

Amitabh
Author by

Amitabh

Updated on August 04, 2020

Comments

  • Amitabh
    Amitabh almost 4 years

    I am unable to uninstall an Assembly (log4net.dll) from GAC. It is giving following error.

    "Assembly is required by one or more applications".

    However if I search the Assembly using ProcessExplorer nothing comes up? How can I remove this Assembly from GAC?

  • vapcguy
    vapcguy about 6 years
    Thanks! Worked for me, too. I also saw it at blogs.msdn.microsoft.com/alanshi/2003/12/10/…
  • squillman
    squillman about 4 years
    Still works, 10 yrs later. Didn't have the HKCU key, but the one I was trying to get rid of was there under the HKLM path.