Valid TaskActions are:

CheckExists (Required: Website, Applications Output: Exists)

Delete (Required: Website, Applications)

Remote Execution Support: Yes

Namespace: MSBuild.ExtensionPack.Web
Assembly: MSBuild.ExtensionPack.Iis7 (in MSBuild.ExtensionPack.Iis7.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)"/>
    <ItemGroup>
        <Application Include="/photos"/>
        <Application Include="/photos2"/>
    </ItemGroup>
    <Target Name="Default">
        <!-- Delete Applications -->
        <MSBuild.ExtensionPack.Web.Iis7Application TaskAction="Delete" Website="NewSite" Applications="@(Application)"/>
        <!-- Check whether applications exist -->
        <MSBuild.ExtensionPack.Web.Iis7Application TaskAction="CheckExists" Website="NewSite" Applications="/photos">
            <Output TaskParameter="Exists" PropertyName="AppExists"/>
        </MSBuild.ExtensionPack.Web.Iis7Application>
        <Message Text="photos2 Exists: $(AppExists)"/>
        <MSBuild.ExtensionPack.Web.Iis7Application TaskAction="CheckExists" Website="NewSite" Applications="/photos3">
            <Output TaskParameter="Exists" PropertyName="AppExists"/>
        </MSBuild.ExtensionPack.Web.Iis7Application>
        <Message Text="photos2 Exists: $(AppExists)"/>
    </Target>
</Project>

Inheritance Hierarchy

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

See Also