Change:
Issue Type: <bBug</bThis seems to be a regression on VS Code Insiders. It does not repro on stable. If I call , it will only execute that specific task, not the task it dependsOn as well. Here's an example Example code to execute the task: VS Code version: Code - Insiders 1.47.0-insider (, 2020-07-07T07:46:45.605Z) OS version: Darwin x64 19.5.0 <details<summarySystem Info</summary </details<details<summaryExtensions (17)</summaryExtensionVersion ------ vscode-pull-request-github0.17.0 vscode-azureappservice0.17.1-alpha vscode-azureresourcegroups0.2.0 vscode-azurestorage0.9.0 vscode-cosmosdb0.13.0 csharp1.22.1 python2020.6. remote-containers0.127.0 remote-ssh0.51.0 remote-ssh-edit0.51.0 azure-account0.8.11 powershell2020.6.0 vscode-typescript-tslint-plugin1.2.3 java0.64.0 vscode-didact0.1.15 sort-lines1.9.0 vscode-java-debug0.26.0 </details<!-- generated by issue reporter --
Caused by Because the task execution is first gotten, then passed to the extension host, the depends on is lost when passing to the extension host.
Works for me on the latest insiders, thanks!
Thank you for verifying!

Discussion:
} } <del> public $executeTask(value: TaskDTO): Promise<TaskExecutionDTO> { </del> <ins> // Passing in a TaskHandleDTO will cause the task to get re-resolved, which is important for tasks are coming from the core, // such as those gotten from a fetchTasks, since they can have missing configuration properties. public $executeTask(value: TaskHandleDTO | TaskDTO): Promise<TaskExecutionDTO> { </ins> return new Promise<TaskExecutionDTO>((resolve, reject) => { <del> const task = TaskDTO.to(value, this._workspaceContextServer, true)!; this._taskService.run(task).then(undefined, reason => { // eat the error, it has already been surfaced to the user and we don't care about it here }); const result: TaskExecutionDTO = { id: task._id, task: TaskDTO.from(task) }; resolve(result); </del> <ins> if (TaskHandleDTO.is(value)) { const workspaceFolder = typeof value.workspaceFolder === 'string' ? value.workspaceFolder : this._workspaceContextServer.getWorkspaceFolder(URI.revive(value.workspaceFolder)); if (workspaceFolder) { this._taskService.getTask(workspaceFolder, value.id, true).then((task: Task | undefined) => { if (!task) { reject(new Error('Task not found')); } else { this._taskService.run(task).then(undefined, reason => { // eat the error, it has already been surfaced to the user and we don't care about it here }); const result: TaskExecutionDTO = { id: value.id, task: TaskDTO.from(task) }; resolve(result); } }, (_error) => { reject(new Error('Task not found')); }); } else { reject(new Error('No workspace folder')); } } else { const task = TaskDTO.to(value, this._workspaceContextServer, true)!; this._taskService.run(task).then(undefined, reason => { // eat the error, it has already been surfaced to the user and we don't care about it here }); const result: TaskExecutionDTO = { id: task._id, task: TaskDTO.from(task) }; resolve(result); } </ins> }); } public $customExecutionComplete(id: string, result?: number): Promise<void> { return new Promise<void>((resolve, reject) => { this._taskService.getActiveTasks().then((tasks) => {

$unregisterTaskProvider(handle: number): Promise<void>; $fetchTasks(filter?: tasks.TaskFilterDTO): Promise<tasks.TaskDTO[]>; $getTaskExecution(value: tasks.TaskHandleDTO | tasks.TaskDTO): Promise<tasks.TaskExecutionDTO>; <del> $executeTask(task: tasks.TaskDTO): Promise<tasks.TaskExecutionDTO>; </del> <ins> $executeTask(task: tasks.TaskHandleDTO | tasks.TaskDTO): Promise<tasks.TaskExecutionDTO>; </ins> $terminateTask(id: string): Promise<void>; $registerTaskSystem(scheme: string, info: tasks.TaskSystemInfoDTO): void; $customExecutionComplete(id: string, result?: number): Promise<void>;

// We have a preserved ID. So the task didn't change. if (tTask._id !== undefined) { // Always get the task execution first to prevent timing issues when retrieving it later <del> const executionDTO = await this._proxy.$getTaskExecution(TaskHandleDTO.from(tTask)); </del> <ins> const handleDto = TaskHandleDTO.from(tTask); const executionDTO = await this._proxy.$getTaskExecution(handleDto); </ins> if (executionDTO.task === undefined) { throw new Error('Task from execution DTO is undefined'); } const execution = await this.getTaskExecution(executionDTO, task); <del> this._proxy.$executeTask(executionDTO.task).catch(() => { /* The error here isn't actionable. */ }); </del> <ins> this._proxy.$executeTask(handleDto).catch(() => { /* The error here isn't actionable. */ }); </ins> return execution; } else { const dto = TaskDTO.from(task, extension);