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

可选取消令牌

返回

有关增量生成的信息

适用于