InstallAssembly Class

MSBuild

Installs assemblies.


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

Syntax

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

Example

Install multiple assemblies by specifying the file names:

 Copy Code
<InstallAssembly AssemblyFiles="Engine.dll;Presenter.dll" />
Install an assembly using the assembly name. Also disable the log file by setting it to a single space:
 Copy Code
<InstallAssembly AssemblyNames="Engine,Version=1.5.0.0,Culture=neutral" LogFile=" "/>
You can easily chain an install to the result of a build:
 Copy Code
<MSBuild Projects="Project1.csproj;Project2.csproj">
 <Output TaskParameter="TargetOutputs" ItemName="ProjectBinaries" />
</MSBuild>
<InstallAssembly AssemblyFiles="@(ProjectBinaries)" />

Remarks

Uses InstallUtil.exe to execute the Install method of Installer classes contained within specified assemblies.

Inheritance Hierarchy

System.Object
   Microsoft.Build.Utilities.Task
      Microsoft.Build.Utilities.ToolTask
         MSBuild.Community.Tasks.Install.InstallAssembly
            MSBuild.Community.Tasks.Install.UninstallAssembly

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.