Unable to uninstall an Assembly from GAC?
Asked Answered
S

3

27

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?

Suffruticose answered 15/3, 2010 at 13:13 Comment(0)
A
37

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.

Asta answered 15/3, 2010 at 13:17 Comment(4)
Thanks! Worked for me, too. I also saw it at blogs.msdn.microsoft.com/alanshi/2003/12/10/…Endodermis
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.Monocoque
On my Windows 11, I had to delete refs from different locations: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\References and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Fusion\ReferencesHind
Link is dead, if anyone is able to find it again please update the post.Greaves
L
7

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.

Lushy answered 15/3, 2010 at 13:22 Comment(0)
R
1

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>
Regatta answered 3/8, 2019 at 13:16 Comment(1)
Please check the guide stackoverflow.com/editing-help, your answer was all faulty because of wrong formattingPasqualepasqueflower

© 2022 - 2024 — McMap. All rights reserved.