From e0143e07528c076a99bb9eb269e2dd0988f2ded0 Mon Sep 17 00:00:00 2001 From: Sakshi Sharma <57200045+SakshiS-harma@users.noreply.github.com> Date: Tue, 10 Aug 2021 15:24:09 -0700 Subject: [PATCH] Update pop-up to be an error message instead of informational message (#16660) * Update pop-up to be an error message * Update message text * Address comment * Address comment --- .../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 20cee4895a..008c205cd8 100644 --- a/extensions/sql-database-projects/src/controllers/projectController.ts +++ b/extensions/sql-database-projects/src/controllers/projectController.ts @@ -241,7 +241,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) {