VCConfiguration.BuildWithProperty Method
Begins an asynchronous build with a given property set to some value beyond what is defined in the project file.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
'Dichiarazione
Sub BuildWithProperty ( _
bldType As bldActionTypes, _
bstrPropertyName As String, _
bstrPropertyValue As String, _
callback As IVCBuildCompleteCallback _
)
void BuildWithProperty(
bldActionTypes bldType,
string bstrPropertyName,
string bstrPropertyValue,
IVCBuildCompleteCallback callback
)
void BuildWithProperty(
[InAttribute] bldActionTypes bldType,
[InAttribute] String^ bstrPropertyName,
[InAttribute] String^ bstrPropertyValue,
[InAttribute] IVCBuildCompleteCallback^ callback
)
abstract BuildWithProperty :
bldType:bldActionTypes *
bstrPropertyName:string *
bstrPropertyValue:string *
callback:IVCBuildCompleteCallback -> unit
function BuildWithProperty(
bldType : bldActionTypes,
bstrPropertyName : String,
bstrPropertyValue : String,
callback : IVCBuildCompleteCallback
)
Parameters
- bldType
Type: Microsoft.VisualStudio.VCProjectEngine.bldActionTypes
One of the enumeration values that specifies the type of build to start.
- bstrPropertyName
Type: System.String
The name of an MSBuild global property to set on the project before the build starts.
- bstrPropertyValue
Type: System.String
A value to set on the property represented by the bstrPropertyName parameter.
- 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
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.