ItemMetadata Element (MSBuild)

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

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>

<ItemMetadataName> Item Metadata value</ItemMetadataName>  

The following sections describe attributes, child elements, and parent elements.

Attributes

AttributeDescription
ConditionOptional attribute.

Condition to be evaluated. For more information, see Conditions.

Child Elements

None.

Parent Elements

ElementDescription
ItemA user-defined element that defines the inputs for the build process.

A text value is optional.

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

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>  

Project File Schema Reference
Items

Show: