Hi,
Many thanks for your answer and sorry for the delay. I was waiting to test your suggestion (doing a custom target) but was on another subject until now.
I have successfully created a target to deploy one web app in a virtual directory with a folder hierarchy, but have an issue when trying to deploy several web app in the same deployment project.
Here is a part of my .btdfproj file :
I think it is because the CreateItem stores the two locations concatenated and not one after the other.
In fact, I don't really know how to handle a collection of values and didn't found a doc on this.
Maybe you have a clue?
Else, I think I will do it with a powershell script.
Can I also ask you the meaning of Include="*" ? (it was required but I don't know why!)
Thanks!
Many thanks for your answer and sorry for the delay. I was waiting to test your suggestion (doing a custom target) but was on another subject until now.
I have successfully created a target to deploy one web app in a virtual directory with a folder hierarchy, but have an issue when trying to deploy several web app in the same deployment project.
Here is a part of my .btdfproj file :
<ItemGroup>
<VDir Include="*">
<VDirName>Employees</VDirName>
<VDirLocation>..\WS\Employees</VDirLocation>
</VDir>
<WebAppList Include="*">
<WebAppPath>/Employees/Level1/MySvc</WebAppPath>
<WebAppLocation>..\WS\Employees\Level1\MySvc</WebAppLocation>
<AppPool>MyAppPool</AppPool>
</WebAppList>
<WebAppList Include="*">
<WebAppPath>/Employees/Level1/MySecondarySvc</WebAppPath>
<WebAppLocation>..\WS\Employees\Level1\MySecondarySvc</WebAppLocation>
<AppPool>MyAppPool</AppPool>
</WebAppList>
</ItemGroup>
And the .targets :<Target Name="CreateWebApp">
<CreateItem Include="%(WebAppList.WebAppLocation)">
<Output TaskParameter="Include" ItemName="WebAppPhysicalLocation" />
</CreateItem>
<Exec Command=""$(AppCmd)" add app /site.name:"$(VDirRootCreation)" /path:%(WebAppList.WebAppPath) /physicalPath:@(WebAppPhysicalLocation->'%(FullPath)')"/>
</Target>
I don't have BTDF error, but an issue in IIS (web app don't appears (given path's format is not valid). I think it is because the CreateItem stores the two locations concatenated and not one after the other.
In fact, I don't really know how to handle a collection of values and didn't found a doc on this.
Maybe you have a clue?
Else, I think I will do it with a powershell script.
Can I also ask you the meaning of Include="*" ? (it was required but I don't know why!)
Thanks!