共用方式為


TaskItem.CopyMetadataTo(ITaskItem) Method

Definition

Copy the metadata (but not the ItemSpec) to destinationItem. If a particular metadata already exists on the destination item, then it is not overwritten -- the original value wins.

public:
 virtual void CopyMetadataTo(Microsoft::Build::Framework::ITaskItem ^ destinationItem);
public void CopyMetadataTo (Microsoft.Build.Framework.ITaskItem destinationItem);
abstract member CopyMetadataTo : Microsoft.Build.Framework.ITaskItem -> unit
override this.CopyMetadataTo : Microsoft.Build.Framework.ITaskItem -> unit
Public Sub CopyMetadataTo (destinationItem As ITaskItem)

Parameters

destinationItem
ITaskItem

The item to copy metadata to.

Implements

Remarks

If the metadata already exists on the destination item, then it is not overwritten. The original metadata value supersedes the copied metadata value.

This method does not copy the item specification to the destination task item.

Applies to