15
I'm writing a script for msbuild which should make two batches in one step.
Example: 2 ItemGroups
<ItemGroup>
<GroupOne Include="1" />
<GroupOne Include="2" />
</ItemGroup>
<ItemGroup>
<GroupTwo Include="A" />
<GroupTwo Include="B" />
</ItemGroup>
These two groups should be looped within each other:
<Message Text="%(GroupOne.Identity) %(GroupTwo.Identity)" />
I hoped that msbuild makes the result up of both batches giving
1 A
2 A
1 B
2 B
as result.
But that didn't happen. Instead, it returned the following useless crap:
1
2
A
B
Doing it the way the blog from the link below proposes (using a local propertygroup) like
<PropertyGroup>
<GroupOneStep>%(GroupOne.Identity)</GroupOneStep>
</PropertyGroup>
<Message Text="$(GroupOneStep) %(GroupTwo.Identity)" />
makes
2 A
2 B
Any hints? I'm going mad. :-(
PS: Here's a blogpost about the topic - unfortunately it doesn't work as propsed there: http://blogs.msdn.com/b/giuliov/archive/2010/04/30/gotcha-msbuild-nested-loops-double-batching.aspx