This documentation is archived and is not being maintained.

BuildProject Method

Visual Studio .NET 2003

Builds the specified project and its dependencies in the context of the specified solution configuration.

[Visual Basic .NET]
Public Sub BuildProject( _
   SolutionConfiguration As String, _
   ProjectUniqueName As String, _
   Optional WaitForBuildToFinish As Boolean = False _
) 
[Visual Basic 6]
Sub BuildProject( _
   SolutionConfiguration As String, _
   ProjectUniqueName As String, _
   Optional WaitForBuildToFinish As Boolean = False _
) 
[C++]
HRESULT __stdcall BuildProject(
   BSTR SolutionConfiguration,
   BSTR ProjectUniqueName,
   VARIANT_BOOL WaitForBuildToFinish
);
[C#]
void BuildProject(
   string SolutionConfiguration,
   string ProjectUniqueName,
   bool WaitForBuildToFinish
);
[JScript .NET]
public function BuildProject(
   SolutionConfiguration : String,
   ProjectUniqueName : String,
   WaitForBuildToFinish : Boolean
)

Parameters

SolutionConfiguration
Required. The name of the new solution configuration that provides the context in which to build the project.
ProjectUniqueName
Required. The project to build.
WaitForBuildToFinish
Optional. Determines whether to wait for the build to complete. If True, then waits, otherwise, no.

Remarks

BuildProject returns immediately. To determine when a solution build operation is complete, you must check the OnBuildDone event.

BuildProject does not affect the UI in terms of changing the active solution configuration or selected project. If you want to build the project relative to the active solution configuration, use DTE.SolutionBuild.ActiveConfiguration.Name.

BuildProject does affect the UI based on the DTE.SuppressUI flag in that the Status Bar flickers and the Output window and Task List are always updated.

The specified project and all its dependencies is built as long as the dependencies are checked to be built in the specified solution configuration.

Example

See Also

Applies To: SolutionBuild Object

Show: