Skip to content

Commit

Permalink
Add Help link to .NET SDK install prompt (#3508)
Browse files Browse the repository at this point in the history
This adds a Help link to the .NET SDK install prompt to help users troubleshoot problems with locating `dotnet`.
  • Loading branch information
gregg-miskelly authored Jan 15, 2020
1 parent e4e631a commit 5c4d5c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/coreclr-debug/activate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,19 @@ function showDotnetToolsWarning(message: string): void {
if (!config.get('suppressDotnetInstallWarning', false)) {
const getDotNetMessage = 'Get the .NET Core SDK';
const goToSettingsMessage = 'Disable this message in user settings';
const helpMessage = 'Help';
// Buttons are shown in right-to-left order, with a close button to the right of everything;
// getDotNetMessage will be the first button, then goToSettingsMessage, then the close button.
vscode.window.showErrorMessage(message,
goToSettingsMessage, getDotNetMessage).then(value => {
goToSettingsMessage, getDotNetMessage, helpMessage).then(value => {
if (value === getDotNetMessage) {
let dotnetcoreURL = 'https://dot.net/core-sdk-vscode';

vscode.env.openExternal(vscode.Uri.parse(dotnetcoreURL));
} else if (value === goToSettingsMessage) {
vscode.commands.executeCommand('workbench.action.openGlobalSettings');
} else if (value == helpMessage) {
let helpURL = 'https://aka.ms/VSCode-CS-DotnetNotFoundHelp';
vscode.env.openExternal(vscode.Uri.parse(helpURL));
}
});
}
Expand Down

0 comments on commit 5c4d5c7

Please sign in to comment.