Global Assembly Cache Tool (gacutil.exe/gacutil)

The Global Assembly Cache tool allows you to view and manipulate the contents of the global assembly cache.

This application file is named gacutil.exe on a Shared Source CLI (SSCLI) built on Microsoft® Windows®.  It is named gacutil on an SSCLI built on FreeBSD.

Usage:

gacutil [options] [assembly]
Argument Description
assembly The name of a file that contains an assembly manifest.

Options

Options can be specified using either a dash (-) or a slash (/).

Note: the SSCLI implementation of gacutil does not support code download or precompiled JIT.

Some options listed below are not valid on the SSCLI.

Option Description
/cdl Deletes the contents of the download cache

[SSCLIChange: Not supported on the SSCLI.]

/h[elp] Displays command syntax and options for the tool.
/i assembly Installs an assembly into the global assembly cache.
/if Installs an assembly to the global assembly cache and forces overwrite if assembly already exists in cache.

[SSCLIChange: Not supported on the SSCLI.]

/ir Installs an assembly to the global assembly cache with traced reference.

[SSCLIChange: not supported on the SSCLI.]

/l Lists the contents of the global assembly cache.
/ldl Lists the contents of the downloaded files cache

[SSCLIChange: Not supported on the SSCLI.]

/nologo Suppresses the Microsoft startup banner display.
/silent Suppresses the display of all output.
/u[ngen] assemblyfile Uninstalls a specified assembly, assemblyfile, from the global assembly cache.

If -ungen is specified, the assembly is removed from the cache of ngen'd files, otherwise the assembly is removed from the global assembly cache

[SSCLIChange: The /ungen option is not supported on the SSCLI.]

/? Displays command syntax and options for the tool.

When using this tool on the FreeBSD operating system /? may expand to a filename. Instead use the /help option variation, use -?, or enclose the /? option in quotes: "/?"

Remarks

Gacutil.exe allows you to install assemblies into the cache, remove them from the cache, and list the contents of the cache.

Examples

The following command inserts the file mydll.dll into the global assembly cache.

gacutil /i mydll.dll

The following command removes the assembly hello from the global assembly cache.

gacutil /u hello

Note that the previous command might remove more than one assembly from the assembly cache because the assembly name is not fully specified. For example, if both version 1.0.0.0 and 3.2.2.1 of hello are installed in the cache, the command gacutil /u hello removes both of the assemblies.

Use the following example to avoid removing more than one assembly. This command removes only the hello assembly that matches the fully specified version number, culture, and public key.

gacutil /u hello,
Version=1.0.0.1,Culture=”de”,PublicKeyToken=45e343aae32233ca

The following command lists the contents of the global assembly cache.

gacutil /l

See Also

Tools Index

Copyright (c) 2002 Microsoft Corporation