Merge pull request #3179 from richlander/master

Update .NET Core 'CLI' uses
This commit is contained in:
Ravi Chande 2019-07-18 11:02:45 -07:00 коммит произвёл GitHub
Родитель 065f9d02e0 109bb6e402
Коммит 3b00360b9f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 6 добавлений и 11 удалений

Просмотреть файл

@ -398,7 +398,7 @@
"csharp.suppressDotnetInstallWarning": {
"type": "boolean",
"default": false,
"description": "Suppress the warning that the .NET CLI is not on the path."
"description": "Suppress the warning that the .NET Core SDK is not on the path."
},
"csharp.unitTestDebuggingOptions": {
"type": "object",

Просмотреть файл

@ -83,19 +83,14 @@ function showInstallErrorMessage(eventStream : EventStream) {
function showDotnetToolsWarning(message: string): void {
const config = vscode.workspace.getConfiguration('csharp');
if (!config.get('suppressDotnetInstallWarning', false)) {
const getDotNetMessage = 'Get .NET CLI tools';
const getDotNetMessage = 'Get the .NET Core SDK';
const goToSettingsMessage = 'Disable this message in user settings';
// 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 => {
if (value === getDotNetMessage) {
let dotnetcoreURL = 'https://www.microsoft.com/net/core';
// Windows redirects https://www.microsoft.com/net/core to https://www.microsoft.com/net/core#windowsvs2015
if (process.platform == "win32") {
dotnetcoreURL = dotnetcoreURL + '#windowscmd';
}
let dotnetcoreURL = 'https://dot.net/core-sdk-vscode';
vscode.env.openExternal(vscode.Uri.parse(dotnetcoreURL));
} else if (value === goToSettingsMessage) {

Просмотреть файл

@ -9,7 +9,7 @@ import * as semver from 'semver';
import * as os from 'os';
import { execChildProcess } from './../common';
const MINIMUM_SUPPORTED_DOTNET_CLI: string = '1.0.0-preview2-003121';
const MINIMUM_SUPPORTED_DOTNET_CLI: string = '1.0.0';
export class DotnetInfo
{
@ -98,7 +98,7 @@ export class CoreClrDebugUtil
}).catch((error) => {
// something went wrong with spawning 'dotnet --info'
let dotnetError = new DotNetCliError();
dotnetError.ErrorMessage = 'The .NET CLI tools cannot be located. .NET Core debugging will not be enabled. Make sure .NET CLI tools are installed and are on the path.';
dotnetError.ErrorMessage = 'The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path.';
dotnetError.ErrorString = "Failed to spawn 'dotnet --info'";
throw dotnetError;
}).then(() => {
@ -106,7 +106,7 @@ export class CoreClrDebugUtil
if (semver.lt(dotnetInfo.Version, MINIMUM_SUPPORTED_DOTNET_CLI))
{
let dotnetError = new DotNetCliError();
dotnetError.ErrorMessage = 'The .NET CLI tools on the path are too old. .NET Core debugging will not be enabled. The minimum supported version is ' + MINIMUM_SUPPORTED_DOTNET_CLI + '.';
dotnetError.ErrorMessage = 'The .NET Core SDK located on the path is too old. .NET Core debugging will not be enabled. The minimum supported version is ' + MINIMUM_SUPPORTED_DOTNET_CLI + '.';
dotnetError.ErrorString = "dotnet cli is too old";
throw dotnetError;
}