Valid TaskActions are:

AddComponent (Required: Path, ApplicationName Optional: Activation, Identity, UserPassword, Framework)

AddNativeComponent (Required: Path, ApplicationName Optional: Activation, Identity, UserPassword, Framework)

CheckApplicationExists (Required: ApplicationName Output: Exists)

CreateApplication (Required: ApplicationName Optional: Activation, EnforceAccessChecks, Identity, UserPassword)

DeleteApplication (Required: ApplicationName)

RemoveComponent (Required: Path Optional: Framework)

SetConstructor (Required: ApplicationName, ComponentName, ConstructorString)

SetAccessIisIntrinsicProperties (Required: ApplicationName, ComponentName Optional: AllowIntrinsicIisProperties)

SetTransactionSupport (Required: ApplicationName, ComponentName, Transaction)

ShutDownApplication (Required: ApplicationName)

UpdateApplication (Required: ApplicationName Optional: Activation, Identity, UserPassword)

Remote Execution Support: No

Namespace: MSBuild.ExtensionPack.Computer
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 3.5.0.0

Examples

Xml Copy imageCopy
<Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath>
        <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath>
    </PropertyGroup>
    <Import Project="$(TPath)"/>
    <Target Name="Default">
        <!--- Add a component -->
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="AddComponent" Path="C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main3.5\SampleScratchpad\SampleBuildBinaries\EntServices.dll" ApplicationName="MyApplication" Identity="Interactive User"/>
        <!-- Check it exists -->
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="CheckApplicationExists" ApplicationName="MyApplication">
            <Output TaskParameter="Exists" PropertyName="DoI"/>
        </MSBuild.ExtensionPack.Computer.ComponentServices>
        <Message Text="Exists: $(DoI)"/>
        <!--- Remove the component -->
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="RemoveComponent" Path="C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main3.5\SampleScratchpad\SampleBuildBinaries\EntServices.dll" ApplicationName="MyApplication"/>
        <!-- Check it exists again-->
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="CheckApplicationExists" ApplicationName="MyApplication">
            <Output TaskParameter="Exists" PropertyName="DoI"/>
        </MSBuild.ExtensionPack.Computer.ComponentServices>
        <Message Text="Exists: $(DoI)"/>
        <!--- Add a component -->
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="AddComponent" Path="C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main3.5\SampleScratchpad\SampleBuildBinaries\EntServices.dll" ApplicationName="MyApplication" Identity="Interactive User"/>
        <!-- Check it exists -->
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="CheckApplicationExists" ApplicationName="MyApplication">
            <Output TaskParameter="Exists" PropertyName="DoI"/>
        </MSBuild.ExtensionPack.Computer.ComponentServices>
        <Message Text="Exists: $(DoI)"/>
        <!-- Various quick tasks -->
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="ShutDownApplication" ApplicationName="MyApplication"/>
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="UpdateApplication" Activation="Inproc" ApplicationName="MyApplication"/>
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="SetTransactionSupport" Transaction="RequiresNew" ComponentName="BankComponent.Account" ApplicationName="MyApplication"/>
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="SetConstructor" ComponentName="BankComponent.Account" ApplicationName="MyApplication" ConstructorString="demo"/>
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="SetConstructor" ComponentName="BankComponent.Account" ApplicationName="MyApplication" ConstructorString=""/>
        <MSBuild.ExtensionPack.Computer.ComponentServices TaskAction="DeleteApplication" ApplicationName="MyApplication"/>
    </Target>
</Project>

Inheritance Hierarchy

System..::..Object
  Microsoft.Build.Utilities..::..Task
    MSBuild.ExtensionPack..::..BaseTask
      MSBuild.ExtensionPack.Computer..::..ComponentServices

See Also