共用方式為


ITaskItem2 Interface

This interface adds escaping support to the ITaskItem interface.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

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

Syntax

'Declaration
<ComVisibleAttribute(True)> _
<GuidAttribute("ac6d5a59-f877-461b-88e3-b2f06fce0cb9")> _
Public Interface ITaskItem2 _
    Inherits ITaskItem
[ComVisibleAttribute(true)]
[GuidAttribute("ac6d5a59-f877-461b-88e3-b2f06fce0cb9")]
public interface ITaskItem2 : ITaskItem
[ComVisibleAttribute(true)]
[GuidAttribute(L"ac6d5a59-f877-461b-88e3-b2f06fce0cb9")]
public interface class ITaskItem2 : ITaskItem
[<ComVisibleAttribute(true)>]
[<GuidAttribute("ac6d5a59-f877-461b-88e3-b2f06fce0cb9")>]
type ITaskItem2 =  
    interface 
        interface ITaskItem 
    end
public interface ITaskItem2 extends ITaskItem

The ITaskItem2 type exposes the following members.

Properties

  Name Description
Public property EvaluatedIncludeEscaped Gets or sets the item include value e.g. for disk-based items this would be the file path.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property ItemSpec Gets or sets the item specification.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ITaskItem.)
Public property MetadataCount Gets the number of metadata entries associated with the item.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ITaskItem.)
Public property MetadataNames Gets the names of the metadata entries associated with the item.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ITaskItem.)

Top

Methods

  Name Description
Public method CloneCustomMetadata Gets the collection of custom metadata.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ITaskItem.)
Public method CloneCustomMetadataEscaped ITaskItem2 implementation which returns a clone of the metadata on this object. Values returned are in their original escaped form.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method CopyMetadataTo Copies the custom metadata entries to another item.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ITaskItem.)
Public method GetMetadata Gets the value of the specified metadata entry.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ITaskItem.)
Public method GetMetadataValueEscaped Allows the values of metadata on the item to be queried.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method RemoveMetadata Removes the specified metadata entry from the item.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ITaskItem.)
Public method SetMetadata Adds or changes a custom metadata entry to the item.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ITaskItem.)
Public method SetMetadataValueLiteral Allows a piece of custom metadata to be set on the item. Assumes that the value passed in is unescaped, and escapes the value as necessary in order to maintain its value.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Top

See Also

Reference

Microsoft.Build.Framework Namespace