Using Global Assembly Cache (GAC) Deployment

Glossary Item Box

Infragistics® NetAdvantage® for ASP.NET (CLR 2.0)

Using Global Assembly Cache (GAC) Deployment

Installing application components into the the Global Assembly Cache (GAC) can be useful if you are installing components that will be used by multiple applications on the same machine, or if you need to run multiple versions of the same assembly on a single computer.

By default when you install the Infragistics NetAdvantage for ASP.NET toolset the control assemblies are installed into the GAC. If you would like to deploy the Infragistics components that are part of your application into the GAC of the client computer there are three primary methods.

Using Gacutil.exe to add components to the GAC

The Gacutil.exe tool is a command line utility installed as part of the base .NET framework which can be used to add and remove application components to/from the GAC. The Gacutil.exe tool is located in the .NET Framework installation directory. The default location for this is C:\Windows\Microsoft.NET\Framework\v2.0.50727\.

To use the Gacutil.exe tool:

  1. Open a Visual Studio command prompt
    (Start > Programs > Microsoft Visual Studio .NET 2005 > Visual Studio .NET Tools > Visual Studio .NET 2005 Command Prompt)
  2. Enter the Gacutil.exe command. The following line demonstrates adding the Infragistics WebChart component to the GAC from an application's folder called MyApplication.

    gacutil -i C:\Projects\MyApplication\Infragistics2.WebUI.UltraWebChart.v7.2.dll

Gacutil.exe command line include a number of commands that allow you spe specify the operation you want the tool to perform. The list below explain the available commands:


Gacutil.exe also allows for several options to be specified on the command line:

Using the Windows Explorer GAC extension to add components to the GAC

Because the GAC is a complex storage location for .NET assemblies, it is not easy to view the contents of it like you would be able to view the contents of a standard folder in windows. Thankfully the .NET Framework SDK includes a Windows Explorer extension (SHFusion.dll) that can be used to access the GAC in much the same fashion as a standard windows folder. Using this extension you can view, add or remove files from the GAC using standard Explorer menus or drag and drop operations.

If you have the .NET Framework SDK installed, you can access the GAC through windows explorer by opening C:\Windows\Assembly. The image below shows you how the GAC is displayed in Explorer using the extension.


Viewing the GAC using the Windows Explorer extension

Using this view, you can add assemblies to the GAC by simply dragging and dropping them into the ASSEMBLY folder. You can also delete files from the GAC by selecting the Delete option from the File menu, or the context menu. Also, as you can see by the image above, using the GAC you can install multiple versions of the same assembly onto the same machine. Each application that references the assembly will select the appropriate version based on internal meta-data.

Additional Global Assembly Cache Information

For more information on the use of the GAC and installing applications into the GAC please see these resources:



E-mail your feedback on this topic.

Opinion about our help? Take our survey.

Copyright © 1996-2007 Infragistics, Inc. All rights reserved.

Build Version: 7.2.20072.1063