Valid TaskActions are:

Create (Required: Name Optional: Properties)

CheckExists (Required: Name Output: Exists)

Delete (Required: Name)

GetMetabasePropertyValue (Required: Name, MetabasePropertyNameOutput: MetabasePropertyValue)

Modify (Required: Name, Properties)

Recycle (Required: Name)

Start (Required: Name)

Stop (Required: Name)

Remote Execution Support: Yes. Please note that the machine you execute from must have IIS installed.

Namespace: MSBuild.ExtensionPack.Web
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">
        <!-- Delete an AppPool -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Delete" Name="AnAppPool"/>
        <!-- Create an AppPool -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Create" Name="AnAppPool" Properties="AppPoolAutoStart=TRUE;PeriodicRestartTime=0;PeriodicRestartRequests=0;PeriodicRestartMemory=0;PeriodicRestartPrivateMemory=0;PeriodicRestartSchedule=04:00;IdleTimeout=0;AppPoolQueueLength=2000;CPULimit=0;CPUResetInterval=5;CPUAction=0;MaxProcesses=1;PingingEnabled=TRUE;PingInterval=60;PingResponseTime=90;RapidFailProtection=FALSE;RapidFailProtectionMaxCrashes=5;RapidFailProtectionInterval=5;StartupTimeLimit=60;ShutdownTimeLimit=60;AppPoolIdentityType=3;"/>
        <!-- Modify an AppPool -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="Modify" Name="AnAppPool" Properties="AppPoolAutoStart=TRUE;PeriodicRestartTime=0;PeriodicRestartRequests=0;PeriodicRestartMemory=0;PeriodicRestartPrivateMemory=0;PeriodicRestartSchedule=04:00;IdleTimeout=0;AppPoolQueueLength=1952;CPULimit=0;CPUResetInterval=5;CPUAction=0;MaxProcesses=6;PingingEnabled=TRUE;PingInterval=60;PingResponseTime=90;RapidFailProtection=FALSE;RapidFailProtectionMaxCrashes=5;RapidFailProtectionInterval=5;StartupTimeLimit=60;ShutdownTimeLimit=60;AppPoolIdentityType=3;"/>
        <!-- Check whether an AppPool exists -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="CheckExists" Name="AnAppPool">
            <Output PropertyName="DoesExist" TaskParameter="Exists"/>
        </MSBuild.ExtensionPack.Web.Iis6AppPool>
        <Message Text="AnAppPool exists: $(DoesExist)"/>
        <!-- GetMetabasePropertyValue -->
        <MSBuild.ExtensionPack.Web.Iis6AppPool TaskAction="GetMetabasePropertyValue" Name="DefaultAppPool" MetabasePropertyName="AppPoolState">
            <Output PropertyName="AppPoolState" TaskParameter="MetabasePropertyValue"/>
        </MSBuild.ExtensionPack.Web.Iis6AppPool>
        <Message Text="AppPoolState: $(AppPoolState)"/>
    </Target>
</Project>

Inheritance Hierarchy

System..::..Object
  Microsoft.Build.Utilities..::..Task
    MSBuild.ExtensionPack..::..BaseTask
      MSBuild.ExtensionPack.Web..::..Iis6AppPool

See Also