ProjectItemInstance Class
Wraps an evaluated item for build purposes.
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.
Inheritance Hierarchy
System.Object
Microsoft.Build.Execution.ProjectItemInstance
Namespace: Microsoft.Build.Execution
Assembly: Microsoft.Build (in Microsoft.Build.dll)
Syntax
'Declaration
Public Class ProjectItemInstance _
Implements ITaskItem, ITaskItem2
public class ProjectItemInstance : ITaskItem,
ITaskItem2
public ref class ProjectItemInstance : ITaskItem,
ITaskItem2
type ProjectItemInstance =
class
interface ITaskItem
interface ITaskItem2
end
public class ProjectItemInstance implements ITaskItem, ITaskItem2
The ProjectItemInstance type exposes the following members.
Properties
Name | Description | |
---|---|---|
DirectMetadataCount | Gets the number of pieces of metadata on this 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. | |
EvaluatedInclude | Gets the evaluated Include attribute 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. | |
ItemType | Gets the item type, for example "Compile".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. | |
Metadata | Gets an enumerator over the evaluated metadata of the item. This is a read-only collection. 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. | |
MetadataCount | Gets the number of metadata entries, including metadata inherited from item definitions. 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. | |
MetadataNames | Gets all metadata names of this item, including metadata inherited from item definitions. 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. | |
Project | Gets the owning project.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
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetMetadata | Get the metadata with the given name, including metadata inherited from item definitions. 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. | |
GetMetadataValue | Gets the value of the metadata with the given name, including metadata inherited from item definitions. 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. | |
GetType | (Inherited from Object.) | |
HasMetadata | Determines whether the metadata with the given name is defined on this item (even if its value is empty string). 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. | |
MemberwiseClone | (Inherited from Object.) | |
RemoveMetadata | Removes metadata with the given name. 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. | |
SetMetadata(IEnumerable<KeyValuePair<String, String>>) | Adds metadata with the given names and values. Overwrites any metadata with the same name already in the collection.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. | |
SetMetadata(String, String) | Add metadata with the given name and value. Overwrites any metadata with the same name already in the collection.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. | |
ToString | Gets a String that represents the current 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. (Overrides Object.ToString().) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
ITaskItem.CloneCustomMetadata | ITaskItem implementation. 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. | |
ITaskItem.CopyMetadataTo | ITaskItem implementation. 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. | |
ITaskItem.GetMetadata | ITaskItem implementation. 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. | |
ITaskItem.ItemSpec | ITaskItem implementation. 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. | |
ITaskItem.MetadataNames | ITaskItem implementation. 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. | |
ITaskItem.SetMetadata | ITaskItem implementation. 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. | |
ITaskItem2.CloneCustomMetadataEscaped | ITaskItem2 implementation. 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. | |
ITaskItem2.EvaluatedIncludeEscaped | ITaskItem2 implementation. Evaluated include value, escaped as necessary. May be empty string. 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. | |
ITaskItem2.GetMetadataValueEscaped | ITaskItem2 implementation. 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. | |
ITaskItem2.SetMetadataValueLiteral | ITaskItem2 implementation. 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
Remarks
Does not store item element information, because all evaluation and verification has already been performed.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.