I am not able to understand this behavior: The item group is placed directly under project tag works fine:
<ItemGroup>
<!-- Copy the Dev Config files -->
<Robocopy Include="$(INETROOT)\private\CASI\Reporting\Config\Dev">
<DestinationFolder>$(DevBranch)\Reporting</DestinationFolder>
<FileMatch>*</FileMatch>
</Robocopy>
But When the same is included as child to a target, the item group doesnt get executed:
<!-- Create the Dev Branch -->
<Target Name="CreateDevBranch" AfterTargets="Build">
<CreateItem Include="$(AppRoot)\**\*.*">
<Output TaskParameter="Include" ItemName="CompileOutput" />
</CreateItem>
<Copy SourceFiles="@(CompileOutput)"
DestinationFolder="$(DevBranch)\hello\%(RecursiveDir)"></Copy>
<ItemGroup>
<!-- Copy the Dev Config files -->
<Robocopy Include="$(INETROOT)\private\CASI\Reporting\Config\Dev">
<DestinationFolder>$(DevBranch)\Reporting</DestinationFolder>
<FileMatch>*</FileMatch>
</Robocopy>
</Target>
The strange thing is the copy operation is works and even if i comment the copy operation, the ItemGroup operation still doesnt gets executed
I think I am missing some concept here
Thanks