次の方法で共有


ProjectRootElement.AddItemDefinition(String) Method

Definition

Convenience method that picks a location based on a heuristic: Finds first item definition group with no condition with at least one item definition of same item type, or else adds a new item definition group.

public:
 Microsoft::Build::Construction::ProjectItemDefinitionElement ^ AddItemDefinition(System::String ^ itemType);
public Microsoft.Build.Construction.ProjectItemDefinitionElement AddItemDefinition (string itemType);
member this.AddItemDefinition : string -> Microsoft.Build.Construction.ProjectItemDefinitionElement
Public Function AddItemDefinition (itemType As String) As ProjectItemDefinitionElement

Parameters

itemType
String

The item type of the item definition to be added.

Returns

The added item definition.

Remarks

Creates an item, then adds it to an item group with no Condition attribute and at least one item of same item type. If no such item group is found, creates a new item group and adds the item to it. Items are ordered by Include values.

Applies to