Iis7Application Class

MSBuild Extension Pack

Iis7Application Class MSBuild Extension Pack Help 4.0.12.0
Valid TaskActions are:

CheckExists (Required: Website, Applications Output: Exists)

Delete (Required: Website, Applications)

Remote Execution Support: Yes

Inheritance Hierarchy

SystemObject  Microsoft.Build.UtilitiesTask
    MSBuild.ExtensionPackBaseTask
      MSBuild.ExtensionPack.WebIis7Application

Namespace: MSBuild.ExtensionPack.Web
Assembly: MSBuild.ExtensionPack.Iis7 (in MSBuild.ExtensionPack.Iis7.dll) Version: 4.0.0.0

The Iis7Application type exposes the following members.

Constructors

  NameDescription
Public methodIis7Application
Top
Properties

  NameDescription
Public propertyApplications
ITaskItem of Applications
Public propertyExists
Gets whether the application exists
Public propertyWebsite
Sets the name of the Website
Top
Examples

<Project ToolsVersion="4.0" 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>
See Also

Reference