ProjectElementContainer Class

Provides an abstract container class for project elements.

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.Construction.ProjectElement
    Microsoft.Build.Construction.ProjectElementContainer
      More...

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

Syntax

'Declaration
Public MustInherit Class ProjectElementContainer _
    Inherits ProjectElement
public abstract class ProjectElementContainer : ProjectElement
public ref class ProjectElementContainer abstract : public ProjectElement
[<AbstractClass>]
type ProjectElementContainer =  
    class 
        inherit ProjectElement 
    end
public abstract class ProjectElementContainer extends ProjectElement

The ProjectElementContainer type exposes the following members.

Properties

  Name Description
Public property AllChildren Gets a recursive depth-first enumerator over all child elements.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 AllParents All parent elements of this element, going up to the ProjectRootElement. None if this is a ProjectRootElement. None if this has not been attached to a parent yet.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 ProjectElement.)
Public property Children Gets all child elements.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 ChildrenReversed Gets all child elements, starting from the last child.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 Condition Gets or sets the Condition value. It will return empty string IFF a condition attribute is legal but it’s not present or has no value. It will return null IFF a Condition attribute is illegal on that element. Removes the attribute if the value to set is empty. It is possible for derived classes to throw an InvalidOperationException if setting the condition is not applicable for those elements.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 ProjectElement.)
Public property ConditionLocation Location of the "Condition" attribute on this element, if any. If there is no such attribute, returns null.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 ProjectElement.)
Public property ContainingProject ProjectRootElement (possibly imported) that contains this Xml. Cannot be null.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 ProjectElement.)
Public property Count Gets the number of child elements.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 FirstChild Gets the first child element. 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 Label Gets or sets the Label value. Returns empty string if it is not present. Removes the attribute if the value to set is empty.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 ProjectElement.)
Public property LabelLocation Location of the "Label" attribute on this element, if any. If there is no such attribute, returns null;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 ProjectElement.)
Public property LastChild Gets the last child element.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 Location Location of the corresponding Xml element. May not be correct if file is not saved, or file has been edited since it was last saved. In the case of an unsaved edit, the location only contains the path to the file that the element originates from.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 ProjectElement.)
Public property NextSibling Next sibling element. May be null.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 ProjectElement.)
Public property Parent Null if this is a ProjectRootElement. Null if this has not been attached to a parent yet.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 ProjectElement.)
Public property PreviousSibling Previous sibling element. May be null.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 ProjectElement.)

Top

Methods

  Name Description
Public method AppendChild Appends the child element as the last child of this project container. 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 Clone() (Inherited from ProjectElement.)
Protected method Clone(ProjectRootElement) (Inherited from ProjectElement.)
Public method CopyFrom (Inherited from ProjectElement.)
Protected method CreateNewInstance (Inherited from ProjectElement.)
Protected method DeepClone
Public method DeepCopyFrom
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method InsertAfterChild Inserts the child element after the reference element. 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 InsertBeforeChild Inserts the child element before the reference element.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.
Protected method MemberwiseClone (Inherited from Object.)
Public method PrependChild Prepends the child element as the first child of this project container. 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 RemoveAllChildren Removes all the children, if any, from this project container.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 RemoveChild Removes a child element from this project container.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 ToString (Inherited from Object.)

Top

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.

See Also

Reference

Microsoft.Build.Construction Namespace

Inheritance Hierarchy

System.Object
  Microsoft.Build.Construction.ProjectElement
    Microsoft.Build.Construction.ProjectElementContainer
      Microsoft.Build.Construction.ProjectChooseElement
      Microsoft.Build.Construction.ProjectImportGroupElement
      Microsoft.Build.Construction.ProjectItemDefinitionElement
      Microsoft.Build.Construction.ProjectItemDefinitionGroupElement
      Microsoft.Build.Construction.ProjectItemElement
      Microsoft.Build.Construction.ProjectItemGroupElement
      Microsoft.Build.Construction.ProjectOtherwiseElement
      Microsoft.Build.Construction.ProjectPropertyGroupElement
      Microsoft.Build.Construction.ProjectRootElement
      Microsoft.Build.Construction.ProjectTargetElement
      Microsoft.Build.Construction.ProjectTaskElement
      Microsoft.Build.Construction.ProjectUsingTaskElement
      Microsoft.Build.Construction.ProjectWhenElement
      Microsoft.Build.Construction.UsingTaskParameterGroupElement