共用方式為


Project.IsBuildEnabled Property

Gets or sets a property that selects whether the targets and tasks of this project can be built.

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.

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

Syntax

'Declaration
Public Property IsBuildEnabled As Boolean
public bool IsBuildEnabled { get; set; }
public:
property bool IsBuildEnabled {
    bool get ();
    void set (bool value);
}
member IsBuildEnabled : bool with get, set
function get IsBuildEnabled () : boolean 
function set IsBuildEnabled (value : boolean)

Property Value

Type: System.Boolean
Returns true if the targets and tasks of this project can be built; false otherwise.

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.

.NET Framework Security

See Also

Reference

Project Class

Microsoft.Build.Evaluation Namespace