共用方式為


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.

public:
 bool BuildProjectFile(System::String ^ projectFileName, cli::array <System::String ^> ^ targetNames, System::Collections::IDictionary ^ globalProperties, System::Collections::IDictionary ^ targetOutputs);
public bool BuildProjectFile (string projectFileName, string[] targetNames, System.Collections.IDictionary globalProperties, System.Collections.IDictionary targetOutputs);
abstract member BuildProjectFile : string * string[] * System.Collections.IDictionary * System.Collections.IDictionary -> bool
Public Function BuildProjectFile (projectFileName As String, targetNames As String(), globalProperties As IDictionary, targetOutputs As IDictionary) As Boolean

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