How to select first item in an ItemGroup
I was entirely unaware of this simple trick! Turns out that when you assign a property value to an item metadata, and there are multiple items, all items are iterated and the property is assigned consecutively to each item metadata, leaving you with the last such item metadata as the property value.
If you want the first item, you reverse the item group using the built-in item function and then assign the property:
PreviousWrite entire XML fragments in MSBuild with XmlPokeNextHow to include commit URL in nuget package description
Last updated