共用方式為


ProjectRootElement.AddItemGroup Method

Definition

Convenience method that picks a location based on a heuristic: Adds an item group after the last existing item group, if any; otherwise adds an item group after the last existing property group, if any; otherwise adds a new item group at the end of the project.

public:
 Microsoft::Build::Construction::ProjectItemGroupElement ^ AddItemGroup();
public Microsoft.Build.Construction.ProjectItemGroupElement AddItemGroup ();
member this.AddItemGroup : unit -> Microsoft.Build.Construction.ProjectItemGroupElement
Public Function AddItemGroup () As ProjectItemGroupElement

Returns

The added item group.

Remarks

Creates and adds an item group after the last existing item group, if any. Otherwise, creates an item group after the last existing property group, if any. If no property group exists, creates a new item group at the end of the project.

Applies to