共用方式為


VCConfiguration.BuildWithProperty 方法

將指定的屬性設定為非專案檔中定義的值,來開始非同步建置。

命名空間:  Microsoft.VisualStudio.VCProjectEngine
組件:  Microsoft.VisualStudio.VCProjectEngine (在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

語法

'宣告
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
)

參數

  • bstrPropertyName
    類型:String

    建置開始之前要在專案上設定的 MSBuild 全域屬性的名稱。

  • bstrPropertyValue
    類型:String

    要在 bstrPropertyName 參數所表示的屬性上設定的值。

例外狀況

例外狀況 條件
InvalidOperationException

會在未位於作用中方案組態的 VCConfiguration 物件上叫用此方法。

-或-

已在進行建置。

備註

這個方法已佇列組建可能不會出現在方案建置管理員的組建佇列,這個方法結束時。 必須等候建置完成的呼叫端在背景執行緒必須等待,直到呼叫回呼函式。 這個策略避免在主執行緒的死結,必須提取訊息啟動組建。

回呼函式,則為,否則,假設,呼叫,當這個 VCConfiguration 物件完成建置,可能是,在方案建置完成。 如果其他組建排入佇列,也,就會發生這種情況。 回呼函式在主執行緒上被叫用。

其為指定之使用中目前使用中的方案組態, VCConfiguration 物件中建立。

.NET Framework 安全性

請參閱

參考

VCConfiguration 介面

Microsoft.VisualStudio.VCProjectEngine 命名空間