src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts/AbstractTaskService/runBuildCommand
class AbstractTaskService:	private runBuildCommand(): void {
		if (!this.canRunCommand()) {
			return;
		}
		if (this.schemaVersion === JsonSchemaVersion.V0_1_0) {
			this.build();
			return;
		}
		let options: IProgressOptions = {
			location: ProgressLocation.Window,
			title: nls.localize('TaskService.fetchingBuildTasks', 'Fetching build tasks...')
		};
		let promise = this.getWorkspaceTasks().then(tasks => {
			const buildTasks: ConfiguringTask[] = [];
			for (const taskSource of tasks) {
				for (const task in taskSource[1].configurations?.byIdentifier) {
					if ((taskSource[1].configurations?.byIdentifier[task].configurationProperties.group === TaskGroup.Build) &&
						(taskSource[1].configurations?.byIdentifier[task].configurationProperties.groupType === GroupType.default)) {
						buildTasks.push(taskSource[1].configurations.byIdentifier[task]);
					}
				}
			}
			if (buildTasks.length === 1) {
				this.tryResolveTask(buildTasks[0]).then(resolvedTask => {
					this.run(resolvedTask, undefined, TaskRunSource.User).then(undefined, reason => {
						// eat the error, it has already been surfaced to the user and we don't care about it here
					});
				});
				return;
			}

			return this.getTasksForGroup(TaskGroup.Build).then((tasks) => {
				if (tasks.length > 0) {
					let { defaults, users } = this.splitPerGroupType(tasks);
					if (defaults.length === 1) {
						this.run(defaults[0], undefined, TaskRunSource.User).then(undefined, reason => {
							// eat the error, it has already been surfaced to the user and we don't care about it here
						});
						return;
					} else if (defaults.length + users.length > 0) {
						tasks = defaults.concat(users);
					}
				}
				this.showIgnoredFoldersMessage().then(() => {
					this.showQuickPick(tasks,
						nls.localize('TaskService.pickBuildTask', 'Select the build task to run'),
						{
							label: nls.localize('TaskService.noBuildTask', 'No build task to run found. Configure Build Task...'),
							task: null
						},
						true).then((entry) => {
							let task: Task | undefined | null = entry ? entry.task : undefined;
							if (task === undefined) {
								return;
							}
							if (task === null) {
								this.runConfigureDefaultBuildTask();
								return;
							}
							this.run(task, { attachProblemMatcher: true }, TaskRunSource.User).then(undefined, reason => {
								// eat the error, it has already been surfaced to the user and we don't care about it here
							});
						});
				});
			});
		});
		this.progressService.withProgress(options, () => promise);
	}