How to Install an Assembly in the GAC

Manually install and uninstall a BizTalk assembly in the global assembly cache (GAC) using the Gacutil tool included with Visual Studio.

Using Visual Studio, you can have BizTalk assemblies automatically installed in the GAC when they are deployed from Visual Studio. Set this option in the Deployment Properties of the BizTalk project; see How to Set Deployment Properties in Visual Studio. You cannot, use this method to install non-BizTalk .NET assemblies in the GAC; you must install them manually, as described in this topic.


You can also specify deployment options for assemblies after they are deployed into a BizTalk application by using the BizTalk Server Administration console. See How to Modify the Deployment Options of a BizTalk Assembly, and How to Modify the Deployment Options of a .NET Assembly, COM Component, File, or BAM Artifact.


Sign in with an account that has Write permission to the GAC. The Administrators account on the local computer has this permission.

Install using gacutil

  1. Copy the BizTalk assembly to your local computer.

  2. Open Developer Command Prompt for Visual Studio as administrator.

  3. Type the following:

    gacutil /i path_to_assembly_file /f

    For example, type:
    gacutil /i c:\temp\filename.dll /f

The /f option overwrites any existing assembly that has the same assembly name. For more info on the gacutil commands and options, type gacutil /?.

Uninstall using gacutil

Uninstalling an assembly from the global assembly cache (GAC) is necessary to completely undeploy an application. You can automate this process. Before deploying the application into a production environment, write a pre-processing script that uninstalls the assembly from the GAC automatically when the application is uninstalled. See Using Pre- and Post-processing Scripts to Customize Application Deployment.

You can also use a script to remove additional files and settings. See How to Remove Other Files and Settings for a BizTalk Application.

Using the Windows interface

  1. Open to %systemdrive%\Windows\Assembly.

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

Using the command line

  1. Open Developer Command Prompt for Visual Studio as administrator.

  2. Type the following:

    gacutil /u <fully qualified assembly name>

    For example, type:
    gacutil /u "hello,Version=, Culture=neutral, PublicKeyToken=0123456789ABCDEF"

See Also

Deploying BizTalk Assemblies from Visual Studio into a BizTalk Application
Undeploying BizTalk Applications
How to Uninstall a BizTalk Application
How to Delete a BizTalk Application from the BizTalk Group