Udostępnij za pośrednictwem


Project.IsBuildEnabled Property

Definition

This controls whether or not the building of targets/tasks is enabled for this project. This is for security purposes in case a host wants to closely control which projects it allows to run targets/tasks. By default, for a newly created project, we will use whatever setting is in the parent project collection. When build is disabled, the Build method on this class will fail. However if the host has already created a ProjectInstance, it can still build it. (It is free to put a similar check around where it does this.)

public:
 property bool IsBuildEnabled { bool get(); void set(bool value); };
public bool IsBuildEnabled { get; set; }
member this.IsBuildEnabled : bool with get, set
Public Property IsBuildEnabled As Boolean

Property Value

true if the targets and tasks of this project can be built; otherwise, false.

Remarks

Can be used for security purposes. By default, a new project has the same IsBuildEnabled setting as the parent project collection that contains it. When IsBuildEnabled is false, the Build method on this project fails.

Applies to