<gac>

Manipulates the contents of the global assembly cache.

This tasks provides some of the same functionality as the gacutil tool provided in the .NET SDK.

Specifically, the gac task allows you to install assemblies into the cache and remove them from the cache.

Refer to the Global Assembly Cache Tool (Gacutil.exe) for more information.

Parameters

Attribute Type Description Required
action enum Defines the action to take with the assembly. Supported actions are: install, overwrite, and uninstall. False
assembly string The name of a file that contains an assembly manifest. False
silent bool Quiet mode. False
failonerror bool False
if bool False
timeout int False
unless bool False
verbose bool False

Framework-configurable parameters

Attribute Type Description Required
useruntimeengine bool False

Nested Elements:

<assemblies>

Fileset are used to define multiple assemblies.

</assemblies>

<arg>

</arg>

Examples

Inserts the file mydll.dll into the global assembly cache.

<gac assembly=mydll.dll"/>

Removes the assembly hello from the global assembly cache and the native image cache.

<gac assembly="hello" uninstall="true"/>

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.

<gac assembly='hello,Version=1.0.0.1,Culture="de",PublicKeyToken=45e343aae32233ca' uninstall="true"/>