Sdílet prostřednictvím


IVsSolutionWorkspaceService.BuildProject Method

Definition

Build a project by invoking a build context actions from a provider

public:
 System::Threading::Tasks::Task<bool> ^ BuildProject(System::String ^ projectFile, System::String ^ solutionBuildConfiguration, Microsoft::VisualStudio::Workspace::Build::BuildType buildType, IProgress<Microsoft::VisualStudio::Workspace::IFileContextActionProgressUpdate ^> ^ progress, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<bool> BuildProject (string projectFile, string solutionBuildConfiguration, Microsoft.VisualStudio.Workspace.Build.BuildType buildType, IProgress<Microsoft.VisualStudio.Workspace.IFileContextActionProgressUpdate> progress, System.Threading.CancellationToken cancellationToken);
abstract member BuildProject : string * string * Microsoft.VisualStudio.Workspace.Build.BuildType * IProgress<Microsoft.VisualStudio.Workspace.IFileContextActionProgressUpdate> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function BuildProject (projectFile As String, solutionBuildConfiguration As String, buildType As BuildType, progress As IProgress(Of IFileContextActionProgressUpdate), cancellationToken As CancellationToken) As Task(Of Boolean)

Parameters

projectFile
String

The target project file

solutionBuildConfiguration
String

The solution build configuration

buildType
BuildType

The desired build type

progress
IProgress<IFileContextActionProgressUpdate>

A progress monitor

cancellationToken
CancellationToken

Optional cancellation token

Returns

Completion task with build succeed result

Applies to