Freigeben über


VCConfiguration.BuildAndCallback Method

Definition

Begins an asynchronous build of this configuration.

public:
 void BuildAndCallback(Microsoft::VisualStudio::VCProjectEngine::bldActionTypes buildType, Microsoft::VisualStudio::VCProjectEngine::IVCBuildCompleteCallback ^ callback);
public:
 void BuildAndCallback(Microsoft::VisualStudio::VCProjectEngine::bldActionTypes buildType, Microsoft::VisualStudio::VCProjectEngine::IVCBuildCompleteCallback ^ callback);
void BuildAndCallback(Microsoft::VisualStudio::VCProjectEngine::bldActionTypes buildType, Microsoft::VisualStudio::VCProjectEngine::IVCBuildCompleteCallback const & callback);
[System.Runtime.InteropServices.DispId(787)]
public void BuildAndCallback (Microsoft.VisualStudio.VCProjectEngine.bldActionTypes buildType, Microsoft.VisualStudio.VCProjectEngine.IVCBuildCompleteCallback callback);
[<System.Runtime.InteropServices.DispId(787)>]
abstract member BuildAndCallback : Microsoft.VisualStudio.VCProjectEngine.bldActionTypes * Microsoft.VisualStudio.VCProjectEngine.IVCBuildCompleteCallback -> unit
Public Sub BuildAndCallback (buildType As bldActionTypes, callback As IVCBuildCompleteCallback)

Parameters

buildType
bldActionTypes

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

callback
IVCBuildCompleteCallback

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

Attributes

Exceptions

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

-or-

A build is already in progress.

Remarks

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.

Applies to