Compartilhar via


VCConfiguration.BuildAndCallback Method

Begins an asynchronous build of this configuration.

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

Syntax

'Declaração
Sub BuildAndCallback ( _
    buildType As bldActionTypes, _
    callback As IVCBuildCompleteCallback _
)
void BuildAndCallback(
    bldActionTypes buildType,
    IVCBuildCompleteCallback callback
)
void BuildAndCallback(
    [InAttribute] bldActionTypes buildType, 
    [InAttribute] IVCBuildCompleteCallback^ callback
)
abstract BuildAndCallback : 
        buildType:bldActionTypes * 
        callback:IVCBuildCompleteCallback -> unit 
function BuildAndCallback(
    buildType : bldActionTypes, 
    callback : IVCBuildCompleteCallback
)

Parameters

Exceptions

Exception Condition
InvalidOperationException

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.

.NET Framework Security

See Also

Reference

VCConfiguration Interface

Microsoft.VisualStudio.VCProjectEngine Namespace