src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts/ExtensionsWorkbenchService/installVersion
class ExtensionsWorkbenchService:	async installVersion(extension: IExtension, version: string, installOptions: InstallOptions = {}): Promise<IExtension> {
		if (!(extension instanceof Extension)) {
			return extension;
		}

		if (!extension.gallery) {
			throw new Error('Missing gallery');
		}

		const [gallery] = await this.galleryService.getExtensions([{ id: extension.gallery.identifier.id, version }], CancellationToken.None);
		if (!gallery) {
			throw new Error(nls.localize('not found', "Unable to install extension '{0}' because the requested version '{1}' is not found.", extension.gallery!.identifier.id, version));
		}

		return this.installWithProgress(async () => {
			installOptions.installGivenVersion = true;
			const installed = await this.installFromGallery(extension, gallery, installOptions);
			if (extension.latestVersion !== version) {
				this.ignoreAutoUpdate(new ExtensionKey(gallery.identifier, version));
			}
			return installed;
		}, gallery.displayName);
	}