IBuildEngine.BuildProjectFile Method

Initiates a build of a project file. If the build is successful, the outputs, if any, of the specified targets are returned.

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

bool BuildProjectFile(
	string projectFileName,
	string[] targetNames,
	IDictionary globalProperties,
	IDictionary targetOutputs


Type: System.String

The name of the project file to build.

Type: System.String[]

The names of the target in the project to build. Separate multiple targets with a semicolon (;).

Type: System.Collections.IDictionary

An IDictionary of additional global properties to apply to the project. The key and value must be String data types.

Type: System.Collections.IDictionary

The outputs of each specified target.

Return Value

Type: System.Boolean
true if the build was successful; otherwise, false.

The targetNames, globalProperties, and targetOutputs parameters can be null.

If no targets are specified, MSBuild builds the default targets of the project.

Target outputs are returned as ITaskItem arrays indexed by target name.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft