This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge
More info about Internet Explorer and Microsoft Edge
There are two ways to remove an assembly from the global assembly cache (GAC):
By using the
Global Assembly Cache tool (Gacutil.exe)
. You can use this option to uninstall assemblies that you've placed in the GAC during development and testing.
By using
Windows Installer
. You should use this option to uninstall assemblies when testing installation packages and for production systems.
Removing an assembly with Gacutil.exe
At the command prompt, type the following command:
gacutil –u
<
assembly name
>
In this command,
assembly name
is the name of the assembly to remove from the global assembly cache.
Warning
You should not use Gacutil.exe to remove assemblies on production systems because of the possibility that the assembly may still be required by some application. Instead, you should use the Windows Installer, which maintains a reference count for each assembly it installs in the GAC.
The following example removes an assembly named
hello.dll
from the global assembly cache:
gacutil -u hello
Removing an assembly with Windows Installer
From the Programs and Features app in Control Panel, select the app that you want to uninstall. If the installation package placed assemblies in the GAC, Windows Installer will remove them if they are not used by another application.
Windows Installer maintains a reference count for assemblies installed in the GAC. An assembly is removed from the GAC only when its reference count reaches zero, which indicates that it is not used by any application installed by a Windows Installer package.
See also
Working with Assemblies and the Global Assembly Cache
How to: Install an Assembly into the Global Assembly Cache
Gacutil.exe (Global Assembly Cache Tool)