IBuildEngine.BuildProjectFile Method

Definition

This method allows tasks to initiate a build on a particular project file. If the build is successful, the outputs (if any) of the specified targets are returned.

C#
public bool BuildProjectFile(string projectFileName, string[] targetNames, System.Collections.IDictionary globalProperties, System.Collections.IDictionary targetOutputs);

Parameters

projectFileName
String

The project to build.

targetNames
String[]

The targets in the project to build (can be null).

globalProperties
IDictionary

A hash table of additional global properties to apply to the child project (can be null). The key and value should both be strings.

targetOutputs
IDictionary

The outputs of each specified target (can be null).

Returns

true, if build was successful

Remarks

1) it is acceptable to pass null for both targetNames and targetOutputs 2) if no targets are specified, the default targets are built 3) target outputs are returned as ITaskItem arrays indexed by target name

Applies to

Product Versions
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17