mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
@@ -34,26 +34,25 @@ export class NetCoreTool {
|
||||
|
||||
private _outputChannel: vscode.OutputChannel = vscode.window.createOutputChannel(projectsOutputChannel);
|
||||
|
||||
public findOrInstallNetCore(): boolean {
|
||||
public async findOrInstallNetCore(): Promise<boolean> {
|
||||
if (!this.isNetCoreInstallationPresent) {
|
||||
this.showInstallDialog();
|
||||
await this.showInstallDialog();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private showInstallDialog(): void {
|
||||
vscode.window.showInformationMessage(NetCoreInstallationConfirmation, UpdateNetCoreLocation, InstallNetCore).then(async (result) => {
|
||||
if (result === UpdateNetCoreLocation) {
|
||||
//open settings
|
||||
vscode.commands.executeCommand('workbench.action.openGlobalSettings');
|
||||
}
|
||||
else if (result === InstallNetCore) {
|
||||
//open install link
|
||||
const dotnetcoreURL = 'https://dotnet.microsoft.com/download/dotnet-core/3.1';
|
||||
vscode.env.openExternal(vscode.Uri.parse(dotnetcoreURL));
|
||||
}
|
||||
});
|
||||
private async showInstallDialog(): Promise<void> {
|
||||
let result = await vscode.window.showInformationMessage(NetCoreInstallationConfirmation, UpdateNetCoreLocation, InstallNetCore);
|
||||
if (result === UpdateNetCoreLocation) {
|
||||
//open settings
|
||||
await vscode.commands.executeCommand('workbench.action.openGlobalSettings');
|
||||
}
|
||||
else if (result === InstallNetCore) {
|
||||
//open install link
|
||||
const dotnetcoreURL = 'https://dotnet.microsoft.com/download/dotnet-core/3.1';
|
||||
await vscode.env.openExternal(vscode.Uri.parse(dotnetcoreURL));
|
||||
}
|
||||
}
|
||||
|
||||
private get isNetCoreInstallationPresent(): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user