Open
Description
Issue Description
WithMetadataValue item function does not return anything when parameter is from batch
Steps to Reproduce
<Project>
<ItemGroup>
<ItemA Include="1.txt" M="a" />
<ItemA Include="2.txt" M="b" />
<ItemA Include="3.txt" M="c" />
<ItemB Include="a.txt" />
<ItemB Include="c.txt" />
</ItemGroup>
<Target Name="Build" >
<Warning Text="* @(ItemA->WithMetadataValue('M','%(Filename)'))" Condition="'%(ItemB.Filename)' != ''"/>
</Target>
</Project>
Expected Behavior
Two warnings with matching ItemA in each:
warning : * 1.txt
warning : * 3.txt
Actual Behavior
Two empty warnings:
warning : *
warning : *
Analysis
In most case there is a way to workaround the issue using few temporary ItemGroups and different way of batching.