共用方式為


ProjectCollection.IsBuildEnabled Property

Gets or sets a property that selects by default whether the targets and tasks of projects in the project collection 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
Gets or sets a property that selects by default whether the targets and tasks of projects in this project collection can be built.

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

ProjectCollection Class

Microsoft.Build.Evaluation Namespace