update .net sdk location strings now that .net 6 is supported (#17757)

* update .net install strings now that .net 6 is supported

* copy old setting value to new setting

* update strings

* add link to issue
This commit is contained in:
Kim Santiago
2021-12-02 15:32:07 -08:00
committed by GitHub
parent 8b09ba8844
commit 43d235ea42
6 changed files with 25 additions and 17 deletions

View File

@@ -11,19 +11,20 @@ import * as semver from 'semver';
import { isNullOrUndefined } from 'util';
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { DoNotAskAgain, Install, NetCoreInstallationConfirmation, NetCoreSupportedVersionInstallationConfirmation, UpdateNetCoreLocation } from '../common/constants';
import { DoNotAskAgain, Install, DotnetInstallationConfirmation, NetCoreSupportedVersionInstallationConfirmation, UpdateDotnetLocation } from '../common/constants';
import * as utils from '../common/utils';
import { ShellCommandOptions, ShellExecutionHelper } from './shellExecutionHelper';
const localize = nls.loadMessageBundle();
export const DBProjectConfigurationKey: string = 'sqlDatabaseProjects';
export const NetCoreInstallLocationKey: string = 'netCoreSDKLocation';
export const DotnetInstallLocationKey: string = 'dotnetSDK Location';
export const NetCoreDoNotAskAgainKey: string = 'netCoreDoNotAsk';
export const NetCoreNonWindowsDefaultPath = '/usr/local/share';
export const winPlatform: string = 'win32';
export const macPlatform: string = 'darwin';
export const linuxPlatform: string = 'linux';
export const minSupportedNetCoreVersionForBuild: string = '3.1.0';
export const minSupportedNetCoreVersionForBuild: string = '3.1.0'; // TODO: watch out for EOL support in Dec 2022 https://github.com/microsoft/azuredatastudio/issues/17800
export const enum netCoreInstallState {
netCoreNotPresent,
@@ -66,12 +67,12 @@ export class NetCoreTool extends ShellExecutionHelper {
public async showInstallDialog(): Promise<void> {
let result;
if (this.netCoreInstallState === netCoreInstallState.netCoreNotPresent) {
result = await vscode.window.showErrorMessage(NetCoreInstallationConfirmation, UpdateNetCoreLocation, Install, DoNotAskAgain);
result = await vscode.window.showErrorMessage(DotnetInstallationConfirmation, UpdateDotnetLocation, Install, DoNotAskAgain);
} else {
result = await vscode.window.showErrorMessage(NetCoreSupportedVersionInstallationConfirmation(this.netCoreSdkInstalledVersion!), UpdateNetCoreLocation, Install, DoNotAskAgain);
result = await vscode.window.showErrorMessage(NetCoreSupportedVersionInstallationConfirmation(this.netCoreSdkInstalledVersion!), UpdateDotnetLocation, Install, DoNotAskAgain);
}
if (result === UpdateNetCoreLocation) {
if (result === UpdateDotnetLocation) {
//open settings
await vscode.commands.executeCommand('workbench.action.openGlobalSettings');
} else if (result === Install) {
@@ -93,7 +94,7 @@ export class NetCoreTool extends ShellExecutionHelper {
}
public get netcoreInstallLocation(): string {
return vscode.workspace.getConfiguration(DBProjectConfigurationKey)[NetCoreInstallLocationKey] ||
return vscode.workspace.getConfiguration(DBProjectConfigurationKey)[DotnetInstallLocationKey] ||
this.defaultLocalInstallLocationByDistribution;
}
@@ -194,7 +195,7 @@ export class NetCoreTool extends ShellExecutionHelper {
if (!(await this.findOrInstallNetCore(skipVersionSupportedCheck))) {
if (this.netCoreInstallState === netCoreInstallState.netCoreNotPresent) {
throw new DotNetError(NetCoreInstallationConfirmation);
throw new DotNetError(DotnetInstallationConfirmation);
} else {
throw new DotNetError(NetCoreSupportedVersionInstallationConfirmation(this.netCoreSdkInstalledVersion!));
}