GacUtil Class

MSBuild

MSBuild task to install and uninstall asseblies into the GAC


Namespace: MSBuild.Community.Tasks
Assembly: MSBuild.Community.Tasks (in MSBuild.Community.Tasks.dll)

Syntax

Visual Basic (Declaration)
Public Class GacUtil
    Inherits ToolTask
C#
public class GacUtil : ToolTask
C++
ref class GacUtil : ToolTask
J#
public class GacUtil extends ToolTask
JScript
public class GacUtil extends ToolTask

Example

Install a dll into the GAC.

 Copy Code
                <GacUtil 
                    Command="Install" 
                    Assemblies="MSBuild.Community.Tasks.dll" 
                    Force="true" />
            
Uninstall a dll from the GAC.
 Copy Code
                <GacUtil 
                    Command="Uninstall" 
                    Assemblies="MSBuild.Community.Tasks" 
                    Force="true" />
            

Inheritance Hierarchy

System.Object
   Microsoft.Build.Utilities.Task
      Microsoft.Build.Utilities.ToolTask
         MSBuild.Community.Tasks.GacUtil

Thread Safety

Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

See Also

Syntax based on .NET Framework version 2.0.
Documentation version 1.0.0.0.