ProjectElementContainer.InsertAfterChild Method

Definition

Insert the child after the reference child. Reference child if provided must be parented by this element. Reference child may be null, in which case this is equivalent to PrependChild(child). Throws if the parent is not itself parented. Throws if the reference node does not have this node as its parent. Throws if the node to add is already parented. Throws if the node to add was created from a different project than this node.

C#
public void InsertAfterChild(Microsoft.Build.Construction.ProjectElement child, Microsoft.Build.Construction.ProjectElement reference);

Parameters

child
ProjectElement

The project element to be inserted.

reference
ProjectElement

The project element to be inserted after.

Remarks

Semantics are those of XmlNode.InsertAfterChild.

Applies to

Ürün Sürümler
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17