Freigeben über


ProjectItemDefinitionElement.AddMetadata Method

Definition

Overloads

AddMetadata(String, String)

Convenience method to add a piece of metadata to this item definition. Adds after any existing metadata. Does not modify any existing metadata.

AddMetadata(String, String, Boolean)

Convenience method to add a piece of metadata to this item definition. Adds after any existing metadata. Does not modify any existing metadata.

AddMetadata(String, String)

Source:
ProjectItemDefinitionElement.cs

Convenience method to add a piece of metadata to this item definition. Adds after any existing metadata. Does not modify any existing metadata.

public:
 Microsoft::Build::Construction::ProjectMetadataElement ^ AddMetadata(System::String ^ name, System::String ^ unevaluatedValue);
public Microsoft.Build.Construction.ProjectMetadataElement AddMetadata (string name, string unevaluatedValue);
member this.AddMetadata : string * string -> Microsoft.Build.Construction.ProjectMetadataElement
Public Function AddMetadata (name As String, unevaluatedValue As String) As ProjectMetadataElement

Parameters

name
String

Name of the metadata.

unevaluatedValue
String

Metadata to be added.

Returns

The modified metadata.

Applies to

AddMetadata(String, String, Boolean)

Source:
ProjectItemDefinitionElement.cs

Convenience method to add a piece of metadata to this item definition. Adds after any existing metadata. Does not modify any existing metadata.

public:
 Microsoft::Build::Construction::ProjectMetadataElement ^ AddMetadata(System::String ^ name, System::String ^ unevaluatedValue, bool expressAsAttribute);
public Microsoft.Build.Construction.ProjectMetadataElement AddMetadata (string name, string unevaluatedValue, bool expressAsAttribute);
member this.AddMetadata : string * string * bool -> Microsoft.Build.Construction.ProjectMetadataElement
Public Function AddMetadata (name As String, unevaluatedValue As String, expressAsAttribute As Boolean) As ProjectMetadataElement

Parameters

name
String

The name of the metadata to add

unevaluatedValue
String

The value of the metadata to add

expressAsAttribute
Boolean

If true, then the metadata will be expressed as an attribute instead of a child element, for example <Content CopyToOutputDirectory="PreserveNewest" />

Returns

Applies to