src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts/AbstractTaskService/upgrade
class AbstractTaskService:	private async upgrade(): Promise<void> {
		if (this.schemaVersion === JsonSchemaVersion.V2_0_0) {
			return;
		}

		if (!this.workspaceTrustManagementService.isWorkspaceTrusted()) {
			this._register(Event.once(this.workspaceTrustManagementService.onDidChangeTrust)(isTrusted => {
				if (isTrusted) {
					this.upgrade();
				}
			}));
			return;
		}

		const tasks = await this.getGroupedTasks();
		const fileDiffs: [URI, URI][] = [];
		for (const folder of this.workspaceFolders) {
			const diff = await this.createTasksDotOld(folder);
			if (diff) {
				fileDiffs.push(diff);
			}
			if (!diff) {
				continue;
			}

			const configTasks: (TaskConfig.CustomTask | TaskConfig.ConfiguringTask)[] = [];
			const suppressTaskName = !!this.configurationService.getValue('tasks.suppressTaskName', { resource: folder.uri });
			const globalConfig = {
				windows: <CommandUpgrade>this.configurationService.getValue('tasks.windows', { resource: folder.uri }),
				osx: <CommandUpgrade>this.configurationService.getValue('tasks.osx', { resource: folder.uri }),
				linux: <CommandUpgrade>this.configurationService.getValue('tasks.linux', { resource: folder.uri })
			};
			tasks.get(folder).forEach(task => {
				const configTask = this.upgradeTask(task, suppressTaskName, globalConfig);
				if (configTask) {
					configTasks.push(configTask);
				}
			});
			this._taskSystem = undefined;
			this._workspaceTasksPromise = undefined;
			await this.writeConfiguration(folder, 'tasks.tasks', configTasks);
			await this.writeConfiguration(folder, 'tasks.version', '2.0.0');
			if (this.configurationService.getValue('tasks.showOutput', { resource: folder.uri })) {
				await this.configurationService.updateValue('tasks.showOutput', undefined, { resource: folder.uri });
			}
			if (this.configurationService.getValue('tasks.isShellCommand', { resource: folder.uri })) {
				await this.configurationService.updateValue('tasks.isShellCommand', undefined, { resource: folder.uri });
			}
			if (this.configurationService.getValue('tasks.suppressTaskName', { resource: folder.uri })) {
				await this.configurationService.updateValue('tasks.suppressTaskName', undefined, { resource: folder.uri });
			}
		}
		this.updateSetup();

		this.notificationService.prompt(Severity.Warning,
			fileDiffs.length === 1 ?
				nls.localize('taskService.upgradeVersion', "The deprecated tasks version 0.1.0 has been removed. Your tasks have been upgraded to version 2.0.0. Open the diff to review the upgrade.")
				: nls.localize('taskService.upgradeVersionPlural', "The deprecated tasks version 0.1.0 has been removed. Your tasks have been upgraded to version 2.0.0. Open the diffs to review the upgrade."),
			[{
				label: fileDiffs.length === 1 ? nls.localize('taskService.openDiff', "Open diff") : nls.localize('taskService.openDiffs', "Open diffs"),
				run: async () => {
					for (const upgrade of fileDiffs) {
						await this.editorService.openEditor({
							original: { resource: upgrade[0] },
							modified: { resource: upgrade[1] }
						});
					}
				}
			}]
		);
	}