共用方式為


IBuildService.BuildAsync 方法

定義

叫用提供者的建置內容動作,以累加方式建置專案

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Workspace::Build::BuildProjectIncrementalResult ^> ^ BuildAsync(System::String ^ projectFile, System::String ^ projectFileTarget, System::Collections::Generic::HashSet<System::String ^> ^ selectedReferences, System::Collections::Generic::HashSet<System::String ^> ^ excludedProjects, Microsoft::VisualStudio::Workspace::Build::IBuildConfigurationContext ^ buildConfigurationContext, Microsoft::VisualStudio::Workspace::Build::BuildType buildType, bool enableIncrementalBuild, IProgress<Microsoft::VisualStudio::Workspace::IFileContextActionProgressUpdate ^> ^ progress, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.Build.BuildProjectIncrementalResult> BuildAsync (string projectFile, string projectFileTarget, System.Collections.Generic.HashSet<string> selectedReferences, System.Collections.Generic.HashSet<string> excludedProjects, Microsoft.VisualStudio.Workspace.Build.IBuildConfigurationContext buildConfigurationContext, Microsoft.VisualStudio.Workspace.Build.BuildType buildType, bool enableIncrementalBuild, IProgress<Microsoft.VisualStudio.Workspace.IFileContextActionProgressUpdate> progress, System.Threading.CancellationToken cancellationToken);
abstract member BuildAsync : string * string * System.Collections.Generic.HashSet<string> * System.Collections.Generic.HashSet<string> * Microsoft.VisualStudio.Workspace.Build.IBuildConfigurationContext * Microsoft.VisualStudio.Workspace.Build.BuildType * bool * IProgress<Microsoft.VisualStudio.Workspace.IFileContextActionProgressUpdate> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.Build.BuildProjectIncrementalResult>
Public Function BuildAsync (projectFile As String, projectFileTarget As String, selectedReferences As HashSet(Of String), excludedProjects As HashSet(Of String), buildConfigurationContext As IBuildConfigurationContext, buildType As BuildType, enableIncrementalBuild As Boolean, progress As IProgress(Of IFileContextActionProgressUpdate), cancellationToken As CancellationToken) As Task(Of BuildProjectIncrementalResult)

參數

projectFile
String

項目檔內容

projectFileTarget
String

選擇性項目目標

selectedReferences
HashSet<String>

要建置的根項目參考清單,如果為 null - 所有參考

excludedProjects
HashSet<String>

(在方案案例中,通常使用者卸除的專案清單)

buildConfigurationContext
IBuildConfigurationContext

組建組態內容

buildType
BuildType

組建類型 (建置、重建等)

enableIncrementalBuild
Boolean

啟用累加建置 (UTD 檢查)

progress
IProgress<IFileContextActionProgressUpdate>

進度監視器

cancellationToken
CancellationToken

選擇性取消令牌

傳回

累加組建的相關信息

適用於