5 out of 23 rated this helpful - Rate this topic

How to: Install an Assembly into the Global Assembly Cache

There are two ways to install an assembly into the global assembly cache:

  • Using the Global Assembly Cache tool (Gacutil.exe).

    You can use Gacutil.exe to add strong-named assemblies to the global assembly cache and to view the contents of the global assembly cache.

    Note Note

    Gacutil.exe is only for development purposes and should not be used to install production assemblies into the global assembly cache.

  • Using Microsoft Windows Installer.

    This is the recommended and most common way to add assemblies to the global assembly cache. The installer provides reference counting of assemblies in the global assembly cache, plus other benefits.

Note Note

In earlier versions of the .NET Framework, the Shfusion.dll Windows shell extension enabled you to install assemblies by dragging them in File Explorer. Beginning with the .NET Framework 4, Shfusion.dll is obsolete.

To install a strong-named assembly into the global assembly cache using the Global Assembly Cache tool (Gacutil.exe)

  • At the command prompt, type the following command:

    gacutil -i <assembly name>

    In this command, assembly name is the name of the assembly to install in the global assembly cache.

The following example installs an assembly with the file name hello.dll into the global assembly cache.

gacutil -i hello.dll
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.