Navigation:  Actions > Microsoft .NET >

GAC Install Action

Previous pageReturn to chapter overviewNext page

This action creates a step to install or uninstall a .NET assembly from the Global Assembly Cache (GAC).  When installing, the Assembly field should be the filename of the assembly; when unregistering, it must be the name of the assembly, optionally including the version, culture, and public key token (i.e., MyAssembly or MyAssembly,Version=,Culture=en,PublicKeyToken=874e23ab874e23ab).


Assembly: The filename or assembly name of the assembly to install or uninstall.  When uninstalling an assembly, if Force is unchecked, the assembly name can be a partial name for matching multiple assemblies.  This action can also be used in conjunction with the Process Files action to process multiple assemblies.


Uninstall the assembly: Determines whether the assembly is installed or uninstalled from the GAC.


Uninstall from NGEN cache: If uninstalling, determines whether the assembly is also uninstalled from the NGEN cache.


Force overwrite/uninstall: Determines if an existing file will be overwritten if installing and the file already exists, or if uninstalling, whether all install references will be removed.


Update AssemblyFolders registry key:  If a folder name is specified in this field, a registry key by that name is create/updated or removed from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders and its default entry set to the path of the assembly file.  This allows the assembly to be found when compiling other .NET components that reference the assembly, and causes the assembly to automatically show up in the list of references in Visual Studio .NET without the user having to browse to it.


Override executable filename: Overrides the default executable (gacutil.exe).  If not specified, the 32-bit edition of Visual Build calls the 32-bit version of GacUtil.exe, and the 64-bit edition of Visual Build calls the 64-bit version of GacUtil.exe if available.


Additional command-line options: Use this field to enter any additional command-line options to be added to the gacutil.exe call that is constructed (optional).


When built, this action invokes the GACUtil command-line tool to install or uninstall the assembly (the .NET Framework SDK needs to be installed wherever this action is built), and also updates the registry key above if a folder is provided for the AssemblyFolders field.