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

@@ -10,7 +10,7 @@ import * as templates from '../templates/templates';
import * as path from 'path';
import { ProjectsController } from './projectController';
import { NetCoreTool } from '../tools/netcoreTool';
import { DBProjectConfigurationKey, DotnetInstallLocationKey, NetCoreInstallLocationKey, NetCoreTool } from '../tools/netcoreTool';
import { IconPathHelper } from '../common/iconHelper';
import { WorkspaceTreeItem } from 'dataworkspace';
import * as constants from '../common/constants';
@@ -45,6 +45,13 @@ export default class MainController implements vscode.Disposable {
}
public async activate(): Promise<SqlDatabaseProjectProvider> {
// upgrade path from former netCoreSDKLocation setting to dotnetSDK Location setting
// copy old setting's value to new setting
const oldNetCoreInstallSetting = vscode.workspace.getConfiguration(DBProjectConfigurationKey)[NetCoreInstallLocationKey];
if (oldNetCoreInstallSetting && !vscode.workspace.getConfiguration(DBProjectConfigurationKey)[DotnetInstallLocationKey]) {
await vscode.workspace.getConfiguration(DBProjectConfigurationKey).update(DotnetInstallLocationKey, oldNetCoreInstallSetting, true);
}
await this.initializeDatabaseProjects();
return new SqlDatabaseProjectProvider(this.projectsController);
}