Project.Build Method

Definition

Builds the project.

Overloads

Build()

Builds the default targets in this project.

Build(String)

Builds the specified target in this project.

Build(String[])

Builds the specified list of targets in this project.

Build(String[], IDictionary)

Builds the specified list of targets in this project, and returns the target outputs.

Build(String[], IDictionary, BuildSettings)

Builds the specified list of targets in this project using the specified flags, and returns the target outputs.

Build()

Source:
Project.cs

Builds the default targets in this project.

C#
public bool Build();

Returns

Applies to

.NET Framework 4.8.1 otras versiones
Producto Versiones
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Build(String)

Source:
Project.cs

Builds the specified target in this project.

C#
public bool Build(string targetName);

Parameters

targetName
String

Returns

Applies to

.NET Framework 4.8.1 otras versiones
Producto Versiones
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Build(String[])

Source:
Project.cs

Builds the specified list of targets in this project.

C#
public bool Build(string[] targetNames);

Parameters

targetNames
String[]

Returns

Remarks

This is the public method that host IDEs can call to build a project. It just turns around and calls "BuildProject" on the engine object. All builds must go through the engine object, because it needs to keep track of the projects that are currently in progress, so that we don't end up in infinite loops when we have circular project-to- project dependencies.

Applies to

.NET Framework 4.8.1 otras versiones
Producto Versiones
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Build(String[], IDictionary)

Source:
Project.cs

Builds the specified list of targets in this project, and returns the target outputs.

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

Parameters

targetNames
String[]
targetOutputs
IDictionary

Returns

Remarks

This is the public method that host IDEs can call to build a project. It just turns around and calls "BuildProject" on the engine object. All builds must go through the engine object, because it needs to keep track of the projects that are currently in progress, so that we don't end up in infinite loops when we have circular project-to- project dependencies.

Applies to

.NET Framework 4.8.1 otras versiones
Producto Versiones
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Build(String[], IDictionary, BuildSettings)

Source:
Project.cs

Builds the specified list of targets in this project using the specified flags, and returns the target outputs.

C#
public bool Build(string[] targetNames, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings buildFlags);

Parameters

targetNames
String[]
targetOutputs
IDictionary
buildFlags
BuildSettings

Returns

Remarks

This is the public method that host IDEs can call to build a project. It just turns around and calls "BuildProject" on the engine object. All builds must go through the engine object, because it needs to keep track of the projects that are currently in progress, so that we don't end up in infinite loops when we have circular project-to- project dependencies.

Applies to

.NET Framework 4.8.1 otras versiones
Producto Versiones
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1