ITaskItem.CopyMetadataTo Method

Copies the custom metadata entries to another item.

Namespace:  Microsoft.Build.Framework
Assembly:  Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)

void CopyMetadataTo(
	ITaskItem destinationItem


Type: Microsoft.Build.Framework.ITaskItem

The item to copy the metadata entries to.

Follow the guidelines below when implementing this method.

  • Do not overwrite the ItemSpec property.

  • Do not overwrite existing metadata entries.

  • Do not copy metadata entries that do not make sense on the destination item.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft