ReservedMetaDataPrefix Property

MSBuild

The string that is prepended to all reserved metadata properties.


Namespace: MSBuild.Community.Tasks.Xml
Assembly: MSBuild.Community.Tasks (in MSBuild.Community.Tasks.dll)

Syntax

Visual Basic (Declaration)
Public Property ReservedMetaDataPrefix As String
C#
public string ReservedMetaDataPrefix { get; set; }
C++
public property string ReservedMetaDataPrefix sealed  {
    String get();
    void set(String value);
}
J#
/** property */
public string get_ReservedMetaDataPrefix();

/** property */
public void set_ReservedMetaDataPrefix(string value);
JScript
public function get ReservedMetaDataPrefix() : String

public function set ReservedMetaDataPrefix(value : String);

Remarks

The default value is a single underscore: '_'

All attributes of an element node are added as metadata to the returned ITaskItem, so this property can be used to avoid clashes with the reserved properties. For example, if you selected the following node:

 Copy Code
 <SomeNode _name="x" _value="y" /> 
the _value attribute would clash with the value reserved property, when using the default prefix. If you set the ReservedMetaDataPrefix to another value (two underscores '__') there would be no clash. You would be able to select the attribute using %(item._value) and the value of the node using %(item.__value).

See Also

Syntax based on .NET Framework version 2.0.
Documentation version 1.0.0.0.