2 out of 5 rated this helpful - Rate this topic

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

  1. Navigate to the GAC, which is located at %systemdrive%\Windows\Assembly.

  2. Right-click each assembly file that is included in your application, click Uninstall, and then click Yes to confirm.

Using the command line

  1. Open a Visual Studio command prompt as follows: Click Start, point to All Programs, point to Microsoft Visual Studio 2008, point to Tools, and then click Visual Studio 2008 Command Prompt.

  2. 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=1.0.0.0, Culture=neutral, PublicKeyToken=0123456789ABCDEF"

  © 2009 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)