Adding an application to a website (Iis7Website)

Jan 4, 2011 at 3:04 PM

Hello,

I have a subfolder in my website that I am trying to add as an application.

When I try the following task:

<ItemGroup>
   <Application Include="$(WebDeploymentDir)\$(ApplicationVersion)" />
</ItemGroup>

<MSBuild.ExtensionPack.Web.Iis7Website Path="http://msbuild.dev.domain.corp"
   MachineName="ws03-dev.dev.domain.corp" 
   TaskAction="AddApplication"
   Name="MSBuild.dev.domain.corp"
   PhysicalPath="$(WebDeploymentDir)"
   AppPool="tc-v$(ApplicationVersion)"
   Applications="@(Application)" />

I receive the following error:
"error : ArgumentException: Path cannot be the empty string or all whitespace.\rC:\Users\\Documents\builder\build.xml(338,3): error :"
What am I doing wrong here?

Coordinator
Jan 4, 2011 at 8:57 PM

I think the Physical path and AppPool need to be defined as metadata, e.g.

<Application Include="/photos">
            <PhysicalPath>C:\photos</PhysicalPath>
            <AppPool>NewAppPool100</AppPool>
        </Application>
Then you only need to provide the Name in addition.

AddApplication (Required: Name, Applications)

 

Jan 4, 2011 at 9:05 PM

Mike,

That was exactly the problem.  Thank you.