Skip to content

Instantly share code, notes, and snippets.

Last active November 18, 2021 09:43
What would you like to do?
MSBuild: Selecting first and last items in an ItemGroup
<Project DefaultTargets="Default">
<Items Include="One;Two;Three;Four;Five" />
<Target Name="Default">
<Reversed Include="@(Items->Reverse())" />
<Warning Text="First: $(First)" />
<Warning Text="Last: $(Last)" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment