ProjectElement Properties

Include Protected Members
Include Inherited Members

The ProjectElement type exposes the following members.

Properties

  Name Description
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.

Top

See Also

Reference

ProjectElement Class

Microsoft.Build.Construction Namespace