VCConfiguration.BuildAndCallback Method
Begins an asynchronous build of this configuration.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
'宣告
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
- buildType
Type: Microsoft.VisualStudio.VCProjectEngine.bldActionTypes
One of the enumeration values that specifies the type of build to start.
- callback
Type: Microsoft.VisualStudio.VCProjectEngine.IVCBuildCompleteCallback
An optional callback function that is invoked when the build finishes; otherwise, nulla null reference (Nothing in Visual Basic).
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.