Hi
I have the following task, which because of the combination of DestinationFiles and DestionationFolder does not work, but it grabs the concept of what I want to do:
<CreateItem Include="$(Destination)\**\*.Generated.*.*">
<Output TaskParameter="Include" ItemName="GeneratedFiles" />
</CreateItem>
<Copy Condition=" '%(ConfigurationToBuild.FlavorToBuild)'=='Debug-All' Or '%(ConfigurationToBuild.FlavorToBuild)'=='Release-WebService' "
SourceFiles="@(GeneratedFiles)"
DestinationFiles="@(GeneratedFiles->'%(RecursiveDir)%(Filename)%(Extension)')"
DestinationFolder="$(BinariesRoot)\%(ConfigurationToBuild.PlatformToBuild)\%(ConfigurationToBuild.FlavorToBuild)"
/>
So I have a set of files (data, not code) that are being generated, and these need to be copied to the final binaries location.
In this build, I build 3 configurations at once: a Debug-All version, a Release-Client version and a Release-WebService. The reasons is to keep the same build number and exact same code base, while having the Client and WebService projects 'published' and then picked up by the Setup projects.
If I try to use: DestinationFiles="@(GeneratedFiles->'$(BinariesRoot)\%(ConfigurationToBuild.PlatformToBuild)\%(ConfigurationToBuild.FlavorToBuild)\%(RecursiveDir)%(Filename)%(Extension)')"
MSBuild throws an error on the %(ConfigurationToBuild.FlavorToBuild) part.