Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 1.72 KB

itemmetadata-element-msbuild.md

File metadata and controls

73 lines (53 loc) · 1.72 KB
title description ms.date ms.topic dev_langs helpviewer_keywords author ms.author manager ms.subservice
ItemMetadata Element (MSBuild)
Learn about the MSBuild ItemMetadata element, which contains a user-defined item metadata key that has the metadata value.
03/13/2017
reference
VB
CSharp
C++
ItemMetadata Element [MSBuild]
<ItemMetadata> Element [MSBuild]
ghogen
ghogen
mijacobs
msbuild

ItemMetadata element (MSBuild)

Contains a user-defined item metadata key, which contains the item metadata value. An item may have any number of metadata key-value pairs.

<Project> <ItemGroup> <Item>

Syntax

<ItemMetadataName> Item Metadata value</ItemMetadataName>

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.

Child elements

None.

Parent elements

Element Description
Item A user-defined element that defines the inputs for the build process.

Text value

A text value is optional.

This text specifies the item metadata value, which can be either text or XML.

Example

The following code example shows how to add Culture metadata with the value fr to the item CSFile.

<ItemGroup>
    <CSFile Include="main.cs" >
        <Culture>fr</Culture>
    </CSFile>
</ItemGroup>

See also