Share via

ItemMetadata Element (MSBuild)


This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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



<ItemMetadataName> Item Metadata value</ItemMetadataName>  

Attributes and Elements

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


Attribute Description
Condition Optional attribute.

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

Child Elements


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.



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

    <CSFile Include="main.cs" >  

See Also

Project File Schema Reference