VCConfiguration.BuildAndCallback Method (bldActionTypes, IVCBuildCompleteCallback)


Begins an asynchronous build of this configuration.

Namespace:   Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

void BuildAndCallback(
	bldActionTypes buildType,
	IVCBuildCompleteCallback callback


Type: Microsoft.VisualStudio.VCProjectEngine.bldActionTypes

One of the enumeration values that specifies the type of build to start.

Type: Microsoft.VisualStudio.VCProjectEngine.IVCBuildCompleteCallback

An optional callback function that is invoked when the build finishes; otherwise, null.

Exception Condition

This method is invoked on a VCConfiguration object that is not in the active solution configuration.


A build is already in progress.

This method is present to support previous releases and builds outside Visual Studio. Tools inside Visual Studio should start builds through the Solution Build Manager.

The build that is queued by this method might not appear on the build queue of the Solution Build Manager when this method exits. Callers that must wait for the build to complete should wait on a background thread until the callback function is called. This tactic avoids a deadlock on the main thread, which must pump messages to start the build.

The callback function, if provided, is called as soon as this VCConfiguration object finishes building, which might be before the solution build finishes. This can happen, for example, if other builds are also queued. The callback function is invoked on the main thread.

A VCConfiguration object can be built only if it is active given the currently active solution configuration.

Return to top