Skip to content

Commit 2cbd2ee

Browse files
authored
Merge pull request #14357 from MicrosoftDocs/ghogen-patch-696936
Clarify child elements on items
2 parents a2292cd + 2e8b371 commit 2cbd2ee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/msbuild/item-element-msbuild.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Item Element (MSBuild)
33
description: Learn how MSBuild uses the Item element to contain a user-defined item and its metadata. Every item must be a child of an ItemGroup element.
4-
ms.date: 03/13/2017
4+
ms.date: 9/29/2025
55
ms.topic: reference
66
dev_langs:
77
- VB
@@ -36,7 +36,7 @@ Contains a user-defined item and its metadata. Every item that is used in an MSB
3636

3737
## Specify metadata as attributes
3838

39-
In MSBuild 15.1 or later, any metadata with a name that doesn't conflict with the current list of attributes can optionally be expressed as an attribute.
39+
You can specify item metadata as attributes for as child elements. Any metadata with a name that doesn't conflict with the current list of attributes can be expressed as an attribute.
4040

4141
For example, to specify a list of NuGet packages, you would normally use something like the following syntax.
4242

@@ -81,6 +81,8 @@ Now, however, you can pass the `Version` metadata as an attribute, such as in th
8181
|-------------|-----------------|
8282
|[ItemMetadata](../msbuild/itemmetadata-element-msbuild.md)|A user-defined item metadata key, which contains the item metadata value. There may be zero or more `ItemMetadata` elements in an item.|
8383

84+
MSBuild interprets child elements on item elements as item metadata.
85+
8486
### Parent elements
8587

8688
|Element|Description|

0 commit comments

Comments
 (0)