You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learn how MSBuild uses the ItemDefinitionGroup element to define a set of item definitions, metadata values that are applied to all items in the project.
The ItemDefinitionGroup element lets you define a set of Item Definitions, which are metadata values that are applied to all items in the project, by default. ItemDefinitionGroup supersedes the need to use the CreateItem task and the CreateProperty task. For more information, see Item definitions.
<Project>
<ItemDefinitionGroup>
Syntax
<ItemDefinitionGroupCondition="'String A' == 'String B'">
<Item1>... </Item1>
<Item2>... </Item2>
</ItemDefinitionGroup>
Attributes and elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute
Description
Condition
Optional attribute. Condition to be evaluated. For more information, see Conditions.
The following code example defines two metadata items, m and n, in an ItemDefinitionGroup. In this example, the default metadata "m" is applied to Item "i" because metadata "m" is not explicitly defined by Item "i". However, default metadata "n" is not applied to Item "i" because metadata "n" is already defined by Item "i".