From b0d3d06b5d60c1ba1dfd755e72ec742baf9f17e5 Mon Sep 17 00:00:00 2001 From: Benjin Dubishar Date: Wed, 11 Aug 2021 12:21:30 -0700 Subject: [PATCH] Update pop-up to be an error message instead of informational message (#16660) (#16715) * Update pop-up to be an error message * Update message text * Address comment * Address comment Co-authored-by: Sakshi Sharma <57200045+SakshiS-harma@users.noreply.github.com> --- .../src/controllers/projectController.ts | 5 ++++- extensions/sql-database-projects/src/tools/netcoreTool.ts | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extensions/sql-database-projects/src/controllers/projectController.ts b/extensions/sql-database-projects/src/controllers/projectController.ts index 170ac70e50..2cbeb76240 100644 --- a/extensions/sql-database-projects/src/controllers/projectController.ts +++ b/extensions/sql-database-projects/src/controllers/projectController.ts @@ -238,7 +238,10 @@ export class ProjectsController { .withAdditionalMeasurements({ duration: timeToFailureBuild }) .send(); - vscode.window.showErrorMessage(constants.projBuildFailed(utils.getErrorMessage(err))); + const error = utils.getErrorMessage(err); + if (error !== (constants.NetCoreInstallationConfirmation || constants.NetCoreSupportedVersionInstallationConfirmation)) { + vscode.window.showErrorMessage(constants.projBuildFailed(error)); + } return ''; } } diff --git a/extensions/sql-database-projects/src/tools/netcoreTool.ts b/extensions/sql-database-projects/src/tools/netcoreTool.ts index 295c3e1ea8..02bb56b3ad 100644 --- a/extensions/sql-database-projects/src/tools/netcoreTool.ts +++ b/extensions/sql-database-projects/src/tools/netcoreTool.ts @@ -55,7 +55,7 @@ export class NetCoreTool { public async findOrInstallNetCore(): Promise { if ((!this.isNetCoreInstallationPresent || !await this.isNetCoreVersionSupported())) { if (vscode.workspace.getConfiguration(DBProjectConfigurationKey)[NetCoreDoNotAskAgainKey] !== true) { - await this.showInstallDialog(); + this.showInstallDialog(); // Removing await so that Build and extension load process doesn't wait on user input } return false; } @@ -66,9 +66,9 @@ export class NetCoreTool { public async showInstallDialog(): Promise { let result; if (this.netCoreInstallState === netCoreInstallState.netCoreNotPresent) { - result = await vscode.window.showInformationMessage(NetCoreInstallationConfirmation, UpdateNetCoreLocation, InstallNetCore, DoNotAskAgain); + result = await vscode.window.showErrorMessage(NetCoreInstallationConfirmation, UpdateNetCoreLocation, InstallNetCore, DoNotAskAgain); } else { - result = await vscode.window.showInformationMessage(NetCoreSupportedVersionInstallationConfirmation(this.netCoreSdkInstalledVersion!), UpdateNetCoreLocation, InstallNetCore, DoNotAskAgain); + result = await vscode.window.showErrorMessage(NetCoreSupportedVersionInstallationConfirmation(this.netCoreSdkInstalledVersion!), UpdateNetCoreLocation, InstallNetCore, DoNotAskAgain); } if (result === UpdateNetCoreLocation) {