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)

public Engine(
	BuildPropertyGroup globalProperties,
	ToolsetDefinitionLocations locations,
	int numberOfCpus,
	string localNodeProviderParameters


Type: Microsoft.Build.BuildEngine.BuildPropertyGroup

A BuildPropertyGroup that represents properties to be passed to the child engine.

Type: Microsoft.Build.BuildEngine.ToolsetDefinitionLocations

A ToolsetDefinitionLocations enumeration specifies the location of the Toolset definition.

Type: System.Int32

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

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.

Return to top