By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,222 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Unable to remove any assembly from GAC

P: n/a
I have encountered a situation where I am unable to remove
a .NET assembly from the GAC. The message I receive
is "Assembly 'assemblyname' could not be uninstalled
because it is required by other applications." Although I
have seen this before when trying to remove .NET
assemblies that have been installed via an MSI package, I
now get this message while trying to remove any assembly
I've added to the GAC. Using gacutil does not work
either, and I have tried reformatting the machine to no
avail. Yes, amazingly a fresh install of everything
produced the same problem. The only noteworthy point is
that I have both .NET 1.0 (SP2) and 1.1 installed. Has
anyone else seen this and been able to correct it?

Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Did you use an .msi package to install the assembly initially? If so then
GacUtil may see that the Windows Installer has a componentcode registration
for the assembly and is not removing it because there is a client
productcode registered as a client and the assembly is pinned. So try
uninstalling the .msi based setup if this was used. The Windows Installer
keeps a pin bit set for each client of the assembly, so if all the pins
have not been removed the GacUtil tool probably cannot remove the assembly.
Once the Installer has removed all clients of the assembly it unpins the
assembly and the CLR cleans up the GAC, or the GacUtil tool can be used.
Best regards,
Bradley Jiang
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
|Content-Class: urn:content-classes:message
|From: "Peter Gomis" <pe*********@pb.com>
|Sender: "Peter Gomis" <pe*********@pb.com>
|Subject: Unable to remove any assembly from GAC
|Date: Thu, 24 Jul 2003 15:19:12 -0700
|Lines: 14
|Message-ID: <03****************************@phx.gbl>
|MIME-Version: 1.0
|Content-Type: text/plain;
| charset="iso-8859-1"
|Content-Transfer-Encoding: 7bit
|X-Newsreader: Microsoft CDO for Windows 2000
|X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
|Thread-Index: AcNSMZwrFmsortt5QS+KAydSrdKI4w==
|Newsgroups: microsoft.public.dotnet.general
|Path: cpmsftngxa06.phx.gbl
|Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102358
|NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
|X-Tomcat-NG: microsoft.public.dotnet.general
|
|I have encountered a situation where I am unable to remove
|a .NET assembly from the GAC. The message I receive
|is "Assembly 'assemblyname' could not be uninstalled
|because it is required by other applications." Although I
|have seen this before when trying to remove .NET
|assemblies that have been installed via an MSI package, I
|now get this message while trying to remove any assembly
|I've added to the GAC. Using gacutil does not work
|either, and I have tried reformatting the machine to no
|avail. Yes, amazingly a fresh install of everything
|produced the same problem. The only noteworthy point is
|that I have both .NET 1.0 (SP2) and 1.1 installed. Has
|anyone else seen this and been able to correct it?
|
|

Jul 19 '05 #2

P: n/a
Hi,

Please back up and delete the corresponding item under following registry
key:

HKLM\Software\Classes\Installer\Assemblies\Global\ (Default)

Check to see if it can be uninstalled with gacutil now.

The Windows Installer references for the GAC are held in the registry in
the
following keys.

Per-user installations:
HKEY_CURRENT_USER\Software\Microsoft\Installer\Ass emblies\Global
Per-machine installations:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Asse mblies\Global

It seems that even we use Gacutil to install this assembly, it still adds
some information to this key. We need to delete this reference and then
uinstall the assembly using gacutil.
Best regards,
Bradley Jiang

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
|Content-Class: urn:content-classes:message
|From: "Peter Gomis" <pe*********@pb.com>
|Sender: "Peter Gomis" <pe*********@pb.com>
|References: <03****************************@phx.gbl>
<R0**************@cpmsftngxa06.phx.gbl>
|Subject: RE: Unable to remove any assembly from GAC
|Date: Mon, 28 Jul 2003 05:44:13 -0700
|Lines: 79
|Message-ID: <06****************************@phx.gbl>
|MIME-Version: 1.0
|Content-Type: text/plain;
| charset="iso-8859-1"
|Content-Transfer-Encoding: 7bit
|X-Newsreader: Microsoft CDO for Windows 2000
|X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
|Thread-Index: AcNVBfLUciBAdptPRtidBdMDBYuqgw==
|Newsgroups: microsoft.public.dotnet.general
|Path: cpmsftngxa06.phx.gbl
|Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:102574
|NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
|X-Tomcat-NG: microsoft.public.dotnet.general
|
|I wish that my problem were in fact related to an MSI. As
|I mentioned in the original post, I have this problem with
|any assembly I add and then remove from the GAC. I've
|even created a sample "Hello World" assembly and now
|cannot remove it from the GAC, and it was added via
|gacutil.
|
|>-----Original Message-----
|>Hi,
|>
|>Did you use an .msi package to install the assembly
|initially? If so then
|>GacUtil may see that the Windows Installer has a
|componentcode registration
|>for the assembly and is not removing it because there is
|a client
|>productcode registered as a client and the assembly is
|pinned. So try
|>uninstalling the .msi based setup if this was used. The
|Windows Installer
|>keeps a pin bit set for each client of the assembly, so
|if all the pins
|>have not been removed the GacUtil tool probably cannot
|remove the assembly.
|> Once the Installer has removed all clients of the
|assembly it unpins the
|>assembly and the CLR cleans up the GAC, or the GacUtil
|tool can be used.
|>
|>
|>Best regards,
|>Bradley Jiang
|>
|>
|>This posting is provided "AS IS" with no warranties, and
|confers no rights.
|>--------------------
|>|Content-Class: urn:content-classes:message
|>|From: "Peter Gomis" <pe*********@pb.com>
|>|Sender: "Peter Gomis" <pe*********@pb.com>
|>|Subject: Unable to remove any assembly from GAC
|>|Date: Thu, 24 Jul 2003 15:19:12 -0700
|>|Lines: 14
|>|Message-ID: <03****************************@phx.gbl>
|>|MIME-Version: 1.0
|>|Content-Type: text/plain;
|>| charset="iso-8859-1"
|>|Content-Transfer-Encoding: 7bit
|>|X-Newsreader: Microsoft CDO for Windows 2000
|>|X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
|>|Thread-Index: AcNSMZwrFmsortt5QS+KAydSrdKI4w==
|>|Newsgroups: microsoft.public.dotnet.general
|>|Path: cpmsftngxa06.phx.gbl
|>|Xref: cpmsftngxa06.phx.gbl
|microsoft.public.dotnet.general:102358
|>|NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
|>|X-Tomcat-NG: microsoft.public.dotnet.general
|>|
|>|I have encountered a situation where I am unable to
|remove
|>|a .NET assembly from the GAC. The message I receive
|>|is "Assembly 'assemblyname' could not be uninstalled
|>|because it is required by other applications." Although
|I
|>|have seen this before when trying to remove .NET
|>|assemblies that have been installed via an MSI package,
|I
|>|now get this message while trying to remove any assembly
|>|I've added to the GAC. Using gacutil does not work
|>|either, and I have tried reformatting the machine to no
|>|avail. Yes, amazingly a fresh install of everything
|>|produced the same problem. The only noteworthy point is
|>|that I have both .NET 1.0 (SP2) and 1.1 installed. Has
|>|anyone else seen this and been able to correct it?
|>|
|>|
|>
|>.
|>
|

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.