msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Duplicate Items are logged when KeepDuplicates="false"

Open KirillOsenkov opened this issue 1 year ago • 4 comments

<Project>

  <ItemGroup>
    <Item Include="A;B;B" KeepDuplicates="false" />
  </ItemGroup>

  <Target Name="Message">
    <ItemGroup>
      <File Include="@(Item)" KeepDuplicates="false" />
    </ItemGroup>
    <Message Text="@(File->'%(Identity)', ' ')" />
    <Message Text="@(Item->'%(Identity)', ' ')" />
  </Target>

</Project>

We log the File item as A B B however only A and B are actually added. I think we must be logging before the duplicates are removed?

image

KirillOsenkov avatar Jan 03 '24 03:01 KirillOsenkov