dotnet / dotnet/msbuild

Item element in an ItemGroup in a Target updates all metadata

Open
#12,492 5 comments 2 reactions 0 assignees View on GitHub
Area: Documentation Area: Language triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

If you have an ItemGroup within a target, and an element that has no Include, Exclude or Remove attributes, it acts as an Update and sets metadata on all items in the item group.

```xml







```

Image

As you see here, we first create an Item1 with MetadataName=A1, then have the magical Foo element that sets MetadataName to A2 in all Foo items, then Bar reads the new value of Foo.

Related bug that might make debugging this even more complicated:
https://github.com/dotnet/msbuild/issues/6704

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.