Compartir a través de


Engine Constructor (BuildPropertyGroup, ToolsetDefinitionLocations, Int32, String)

Initializes a new instance of the Engine class.

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.BuildEngine
Assembly:  Microsoft.Build.Engine (in Microsoft.Build.Engine.dll)

Syntax

'Declaration
Public Sub New ( _
    globalProperties As BuildPropertyGroup, _
    locations As ToolsetDefinitionLocations, _
    numberOfCpus As Integer, _
    localNodeProviderParameters As String _
)
public Engine(
    BuildPropertyGroup globalProperties,
    ToolsetDefinitionLocations locations,
    int numberOfCpus,
    string localNodeProviderParameters
)
public:
Engine(
    BuildPropertyGroup^ globalProperties, 
    ToolsetDefinitionLocations locations, 
    int numberOfCpus, 
    String^ localNodeProviderParameters
)
new : 
        globalProperties:BuildPropertyGroup * 
        locations:ToolsetDefinitionLocations * 
        numberOfCpus:int * 
        localNodeProviderParameters:string -> Engine
public function Engine(
    globalProperties : BuildPropertyGroup, 
    locations : ToolsetDefinitionLocations, 
    numberOfCpus : int, 
    localNodeProviderParameters : String
)

Parameters

  • numberOfCpus
    Type: System.Int32

    An integer that specifies the number of CPUs or cores in the system.

  • localNodeProviderParameters
    Type: System.String

    A string of parameters that are used to configure the MSBuild engine. You must format the parameters as ParameterName=ParameterValue. The valid semicolon-separated, optional parameters are as follows:

    MSBUILDLOCATION Indicates where the build process can find MSBuild.exe. This path enables the MSBuild engine to locate MSBuild.exe and start it as a local node. MSBUILDLOCATION is the only essential parameter for a host. The default value is C:\Windows\Microsoft.Net\Framework\v3.5\.

    NODEREUSE Indicates whether the child nodes should remain after the build finishes, in case they can be used later by another build. The nodes are discarded automatically after one minute of non-use. The default value is true.

.NET Framework Security

See Also

Reference

Engine Class

Engine Overload

Microsoft.Build.BuildEngine Namespace