ProjectChooseElement Class

Represents the Choose element in an MSBuild project.

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
      Microsoft.Build.Construction.ProjectChooseElement

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

Syntax

'Declaration
Public Class ProjectChooseElement _
    Inherits ProjectElementContainer
public class ProjectChooseElement : ProjectElementContainer
public ref class ProjectChooseElement : public ProjectElementContainer
type ProjectChooseElement =  
    class 
        inherit ProjectElementContainer 
    end
public class ProjectChooseElement extends ProjectElementContainer

The ProjectChooseElement 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. (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
Public property Condition Gets a nonexistent condition, which is implicitly true.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. (Overrides ProjectElement.Condition.)
Public property ConditionLocation This does not allow conditions, so it should not be called.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. (Overrides ProjectElement.ConditionLocation.)
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. (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
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 OtherwiseElement Gets any Otherwise 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 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.)
Public property WhenElements Gets all the When children. 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

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. (Inherited from ProjectElementContainer.)
Public method Clone() (Inherited from ProjectElement.)
Protected method Clone(ProjectRootElement) (Inherited from ProjectElement.)
Public method CopyFrom (Inherited from ProjectElement.)
Protected method CreateNewInstance (Overrides ProjectElement.CreateNewInstance(ProjectRootElement).)
Protected method DeepClone (Inherited from ProjectElementContainer.)
Public method DeepCopyFrom (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
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. (Inherited from ProjectElementContainer.)
Public method ToString (Inherited from Object.)

Top

Remarks

Does not allow a Condition attribute.

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