How to Uninstall an Assembly from the GAC
This topic describes how to use the Windows interface or the Gacutil command-line tool to uninstall an assembly from the global assembly cache (GAC). This is necessary to completely undeploy an application. To automate this process, before deploying the application into a production environment, we recommend that you write a pre-processing script that will uninstall the assembly from the GAC automatically when the application is uninstalled. For more information, see Using Pre- and Post-processing Scripts to Customize Application Deployment.
You can also use such a script to remove additional files and settings, as described in How to Remove Other Files and Settings for a BizTalk Application.
To perform the procedures in this topic, you must be logged on an account that has Write permissions on the GAC, which is located at %systemdrive%\Windows\Assembly. The Administrators account on the local computer has this permission. For more detailed information on permissions, see Permissions Required for Deploying and Managing a BizTalk Application.
Using the Windows interface
Navigate to the GAC, which is located at %systemdrive%\Windows\Assembly.
Right-click each assembly file that is included in your application, click Uninstall, and then click Yes to confirm.
Using the command line
Start Visual Studio Command Prompt.
At the command prompt, type the following command:
gacutil /u <fully qualifiedassembly name>
In this command, assembly name is the name of the assembly to uninstall from the GAC.
The following example removes an assembly named hello.dll from the GAC.
gacutil /u "hello,Version=126.96.36.199, Culture=neutral, PublicKeyToken=0123456789ABCDEF"
© 2014 Microsoft Corporation. All rights reserved.