diff --git a/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/AppWithApplicationUrlInLaunchSettings.csproj b/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/AppWithApplicationUrlInLaunchSettings.csproj new file mode 100644 index 000000000..be02066ff --- /dev/null +++ b/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/AppWithApplicationUrlInLaunchSettings.csproj @@ -0,0 +1,8 @@ + + + + + Exe + netcoreapp2.1 + + diff --git a/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/Program.cs b/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/Program.cs new file mode 100644 index 000000000..33322e771 --- /dev/null +++ b/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/Program.cs @@ -0,0 +1,16 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace MSBuildTestApp +{ + public class Program + { + public static void Main(string[] args) + { + var message = Environment.GetEnvironmentVariable("ASPNETCORE_URLS"); + Console.WriteLine(message); + } + } +} diff --git a/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/Properties/launchSettings.json b/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/Properties/launchSettings.json new file mode 100644 index 000000000..b61eabd57 --- /dev/null +++ b/TestAssets/TestProjects/AppWithApplicationUrlInLaunchSettings/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:49850/", + "sslPort": 0 + } + }, + "profiles": { + "First": { + "commandName": "Project", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_URLS": "http://localhost:12345/" + }, + "applicationUrl": "http://localhost:67890/" + }, + "Second": { + "commandName": "Project", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:54321/" + } + } +} \ No newline at end of file diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/App.config b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/App.config deleted file mode 100644 index 88fa4027b..000000000 --- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/AssemblyInfo.fs b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/AssemblyInfo.fs deleted file mode 100644 index d8b2c37d6..000000000 --- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/AssemblyInfo.fs +++ /dev/null @@ -1,41 +0,0 @@ -namespace FSharpProject.AssemblyInfo - -open System.Reflection -open System.Runtime.CompilerServices -open System.Runtime.InteropServices - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[] -[] -[] -[] -[] -[] -[] -[] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [] -[] -[] - -do - () \ No newline at end of file diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/FSharpProject.fsproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/FSharpProject.fsproj index cad8d59ce..43b200bd5 100644 --- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/FSharpProject.fsproj +++ b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/FSharpProject.fsproj @@ -1,81 +1,12 @@ - - - + + - Debug - AnyCPU - 2.0 - 52161bb2-18bf-4304-87e7-8d7f0c98ccf3 Exe - FSharpProject - FSharpProject - v4.5.2 - true - 4.4.1.0 - FSharpProject + netcoreapp2.1 - - true - full - false - false - bin\$(Configuration)\ - DEBUG;TRACE - 3 - AnyCPU - bin\$(Configuration)\$(AssemblyName).XML - true - - - pdbonly - true - true - bin\$(Configuration)\ - TRACE - 3 - AnyCPU - bin\$(Configuration)\$(AssemblyName).XML - true - - - 11 - - - - - $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets - - - - - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets - - - - + - - - - - - - True - - - - - - ..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll - - - - + + \ No newline at end of file diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/packages.config b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/packages.config deleted file mode 100644 index 2688d2baf..000000000 --- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectType/App.sln b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectType/App.sln new file mode 100644 index 000000000..5b61df887 --- /dev/null +++ b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectType/App.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26006.2 +MinimumVisualStudioVersion = 10.0.40219.1 +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectType/UnknownProject/UnknownProject.unknownproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectType/UnknownProject/UnknownProject.unknownproj new file mode 100644 index 000000000..2ed799e9d --- /dev/null +++ b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectType/UnknownProject/UnknownProject.unknownproj @@ -0,0 +1,3 @@ + + + diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/UnknownProject/UnknownProject.unknownproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/UnknownProject/UnknownProject.unknownproj index c5e694360..e5a55313b 100644 --- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/UnknownProject/UnknownProject.unknownproj +++ b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/UnknownProject/UnknownProject.unknownproj @@ -1,6 +1,6 @@  - {20E2F8CC-55AA-4705-B10F-7ABA6F107ECE};{130159A9-F047-44B3-88CF-0CF7F02ED50F} + {20E2F8CC-55AA-4705-B10F-7ABA6F107ECE};{130159A9-F047-44B3-88CF-0CF7F02ED50F} diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/UnknownProject/UnknownProject.unknownproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/UnknownProject/UnknownProject.unknownproj index 2615598f1..44f4622a0 100644 --- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/UnknownProject/UnknownProject.unknownproj +++ b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/UnknownProject/UnknownProject.unknownproj @@ -1,6 +1,6 @@  - {130159A9-F047-44B3-88CF-0CF7F02ED50F} + {130159A9-F047-44B3-88CF-0CF7F02ED50F} diff --git a/build/BundledDotnetTools.props b/build/BundledDotnetTools.props index e64552ab0..29c483c57 100644 --- a/build/BundledDotnetTools.props +++ b/build/BundledDotnetTools.props @@ -1,8 +1,8 @@ - - - + + + diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 18795bdb6..b227ba810 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -2,7 +2,7 @@ 2.1.0-preview2-30338 - 2.1.0-preview2-26313-01 + 2.1.0-preview2-26314-02 $(MicrosoftNETCoreAppPackageVersion) 15.7.0-preview-000066 $(MicrosoftBuildPackageVersion) @@ -28,8 +28,8 @@ $(MicrosoftTemplateEngineCliPackageVersion) $(MicrosoftTemplateEngineCliPackageVersion) $(MicrosoftTemplateEngineCliPackageVersion) - 2.1.0-preview2-26313-01 - 2.1.0-preview2-26313-01 + 2.1.0-preview2-26314-02 + 2.1.0-preview2-26314-02 0.1.1-alpha-174 1.2.1-alpha-002133 $(MicrosoftDotNetProjectJsonMigrationPackageVersion) diff --git a/build/MSBuildExtensions.targets b/build/MSBuildExtensions.targets index c6ce9ae6b..09324294e 100644 --- a/build/MSBuildExtensions.targets +++ b/build/MSBuildExtensions.targets @@ -1,9 +1,11 @@ + + + DependsOnTargets="GenerateBundledVersionsProps;GenerateBundledCliToolsProps;RestoreMSBuildExtensionsPackages"> - + @@ -11,19 +13,19 @@ from that package under the net461, net462, etc folders. That is because they come from the NETStandard.Library.NETFramework package, and we want to insert them directly into the CLI from CoreFx instead of having to do a two-hop insertion (CoreFX -> SDK -> CLI) if we need to update them. - + https://github.com/dotnet/sdk/issues/1324 has been filed to exclude these from the Microsoft.NET.Build.Extensions package when we generate it. --> - + - + @@ -68,7 +70,7 @@ - + CLIBuildDll=$(CLIBuildDll); @@ -91,7 +93,7 @@ Microsoft.NETCoreSdk.BundledVersions.props - + + +@(BundledDotnetTools->HasMetadata('ObsoletesCliTool')->' %3CBundledDotNetCliToolReference Include="%(ObsoletesCliTool)" /%3E','%0A') + + +]]> + + + + + + diff --git a/scripts/cli-test-env.bat b/scripts/cli-test-env.bat index 91a31c078..0fd84c053 100644 --- a/scripts/cli-test-env.bat +++ b/scripts/cli-test-env.bat @@ -10,11 +10,11 @@ for %%i in (%~dp0..\) DO ( title CLI Test (%CLI_REPO_ROOT%) REM Add Stage 2 CLI to path -set PATH=%CLI_REPO_ROOT%bin\2\win10-x64\dotnet;%PATH% +set PATH=%CLI_REPO_ROOT%bin\2\win-x64\dotnet;%PATH% set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 set DOTNET_MULTILEVEL_LOOKUP=0 set NUGET_PACKAGES=%CLI_REPO_ROOT%.nuget\packages -set TEST_PACKAGES=%CLI_REPO_ROOT%bin\2\win10-x64\test\packages -set TEST_ARTIFACTS=%CLI_REPO_ROOT%bin\2\win10-x64\test\artifacts -set PreviousStageProps=%CLI_REPO_ROOT%bin\2\win10-x64\PreviousStage.props +set TEST_PACKAGES=%CLI_REPO_ROOT%bin\2\win-x64\test\packages +set TEST_ARTIFACTS=%CLI_REPO_ROOT%bin\2\win-x64\test\artifacts +set PreviousStageProps=%CLI_REPO_ROOT%bin\2\win-x64\PreviousStage.props diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/ProjectTypeGuids.cs b/src/Microsoft.DotNet.Cli.Sln.Internal/ProjectTypeGuids.cs index 547e93eef..63292ebf7 100644 --- a/src/Microsoft.DotNet.Cli.Sln.Internal/ProjectTypeGuids.cs +++ b/src/Microsoft.DotNet.Cli.Sln.Internal/ProjectTypeGuids.cs @@ -6,6 +6,8 @@ namespace Microsoft.DotNet.Cli.Sln.Internal public static class ProjectTypeGuids { public const string CSharpProjectTypeGuid = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"; + public const string FSharpProjectTypeGuid = "{F2A71F9B-5D33-465A-A702-920D77279786}"; + public const string VBProjectTypeGuid = "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}"; public const string SolutionFolderGuid = "{2150E333-8FDC-42A3-9474-1A3956D46DE8}"; } } diff --git a/src/Microsoft.DotNet.Configurer/LocalizableStrings.resx b/src/Microsoft.DotNet.Configurer/LocalizableStrings.resx index 3b46d09d5..0f3baa4dd 100644 --- a/src/Microsoft.DotNet.Configurer/LocalizableStrings.resx +++ b/src/Microsoft.DotNet.Configurer/LocalizableStrings.resx @@ -151,7 +151,7 @@ Here are some options to fix this error: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. \ No newline at end of file diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf index b98e0a4bb..6c8a84691 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf @@ -62,9 +62,9 @@ Tuto chybu můžete opravit pomocí některé z těchto možností: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ Úspěšně se podařilo nainstalovat certifikát pro vývoj ASP.NET Core HTTPS Development Certificate. Pokud chcete certifikátu důvěřovat (platí jenom pro Windows a macOS), nainstalujte nejprve nástroj dev-certs. To uděláte tak, že spustíte dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final a potom dotnet-dev-certs https --trust. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf index c5b1970cc..ff35f87f0 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf @@ -62,9 +62,9 @@ Im Folgenden finden Sie einige Optionen, um diesen Fehler zu beheben: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ Das ASP.NET Core-HTTPS-Entwicklungszertifikat wurde erfolgreich installiert. Um dem Zertifikat zu vertrauen (nur Windows und macOS), installieren Sie zuerst das Tool "dev-certs", indem Sie "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" und anschließend "dotnet-dev-certs https --trust" ausführen. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf index fa1e01cf1..44c0389eb 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf @@ -61,9 +61,9 @@ Estas son algunas opciones para corregir este error: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ El certificado de desarrollo HTTPS de ASP.NET Core se ha instalado correctamente. Para confiar en el certificado (solo Windows y macOS), instale primero la herramienta dev-certs ejecutando "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" y, después, ejecute "dotnet-dev-certs https --trust". diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf index aaa8cfded..95953db3f 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf @@ -62,9 +62,9 @@ Voici quelques options pour corriger cette erreur : ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ Le certificat de développement ASP.NET Core HTTPS a été installé. Pour approuver le certificat (Windows et macOS uniquement), installez d'abord l'outil dev-certs en exécutant 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final', puis exécutez 'dotnet-dev-certs https --trust'. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf index f0aa9cd81..b359ffe68 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf @@ -62,9 +62,9 @@ Ecco alcune opzioni per correggere questo errore: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ Il certificato di sviluppo HTTPS di ASP.NET Core è stato installato. Per considerare attendibile il certificato (solo Windows e macOS), installare prima lo strumento dev-certs eseguendo 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' e quindi eseguire 'dotnet-dev-certs https --trust'. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf index 42c146c99..2632c0543 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf @@ -62,9 +62,9 @@ Here are some options to fix this error: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ ASP.NET Core HTTPS 開発証明書が正常にインストールされました。 証明書を信頼する (Windows および macOS のみ) には、まず 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' を実行して dev-certs ツールをインストールし、次に 'dotnet-dev-certs https --trust' を実行します。 diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf index 4bd36c154..ab5a0750d 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf @@ -62,9 +62,9 @@ Here are some options to fix this error: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ ASP.NET Core HTTPS 개발 인증서를 설치했습니다. 인증서를 신뢰하려면(Windows 및 macOS만 해당) 먼저 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final'을 실행하여 dev-certs 도구를 설치한 다음, 'dotnet-dev-certs https --trust'를 실행하세요. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf index f9c4c7e4f..96a9a22de 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf @@ -62,9 +62,9 @@ Oto kilka opcji naprawiania tego błędu: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ Pomyślnie zainstalowano certyfikat deweloperski protokołu HTTPS programu ASP.NET Core. Aby ufać temu certyfikatowi (dotyczy tylko systemów Windows i macOS), najpierw zainstaluj narzędzie dev-certs, uruchamiając polecenie „dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final”, a następnie uruchom polecenie „dotnet-dev-certs https --trust”. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf index b0a55f54f..9a26ac428 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf @@ -62,9 +62,9 @@ Aqui estão algumas opções para corrigir este erro: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ Certificado de Desenvolvimento HTTPS ASP.NET Core instalado com êxito. Para confiar no certificado (apenas Windows e macOS), primeiramente instale a ferramenta dev-certs executando ‘dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final’ e, em seguida, execute ‘dotnet-dev-certs https --trust’. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf index 53e8228c1..7d539fe75 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf @@ -62,9 +62,9 @@ Here are some options to fix this error: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ Сертификат разработки HTTPS для ASP.NET Core установлен. Чтобы сделать сертификат доверенным (только Windows и macOS), сначала установите инструмент dev-certs, выполнив команду "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final", а затем выполните "dotnet-dev-certs https --trust". diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf index 7ce095994..10d1e33a4 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf @@ -62,9 +62,9 @@ Bu hatayı düzeltmek için bazı seçenekler: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ ASP.NET Core HTTPS Geliştirme Sertifikası başarıyla yüklendi. Sertifikaya güvenmek için (yalnızca Windows ve macOS) önce 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final', sonra 'dotnet-dev-certs https --trust' komutlarını çalıştırarak dev-certs aracını yükleyin. diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf index 89d13dacf..43c95f582 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf @@ -62,9 +62,9 @@ Here are some options to fix this error: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ 已成功安装 ASP.NET Core HTTPS 开发证书。 要信任证书(仅限 Windows 和 macOS),请首先通过运行 "dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final" 安装 dev-certs 工具,然后运行 "dotnet-dev-certs https --trust"。 diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf index dac4c5015..6277f3a67 100644 --- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf @@ -62,9 +62,9 @@ Here are some options to fix this error: ASP.NET Core ------------ Successfully installed the ASP.NET Core HTTPS Development Certificate. -To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. +To trust the certificate (Windows and macOS only) first install the dev-certs tool by running 'dotnet tool install dotnet-dev-certs -g --version 2.1.0-preview1-final' and then run 'dotnet-dev-certs https --trust'. For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054. - ASP.NET Core + ASP.NET Core ------------ 已成功安裝 ASP.NET Core HTTPS 開發憑證。 若要信任此憑證 (僅限 Windows 與 macOS),請先執行 'dotnet install tool dotnet-dev-certs -g --version 2.1.0-preview1-final' 安裝 dev-certs 工具,然後再執行 'dotnet-dev-certs https --trust'。 diff --git a/src/dotnet/BuiltInCommandsCatalog.cs b/src/dotnet/BuiltInCommandsCatalog.cs index 75666ea65..3ec1db6ec 100644 --- a/src/dotnet/BuiltInCommandsCatalog.cs +++ b/src/dotnet/BuiltInCommandsCatalog.cs @@ -18,11 +18,9 @@ using Microsoft.DotNet.Tools.Run; using Microsoft.DotNet.Tools.Sln; using Microsoft.DotNet.Tools.Store; using Microsoft.DotNet.Tools.Test; -using Microsoft.DotNet.Tools.Uninstall; using Microsoft.DotNet.Tools.VSTest; using System.Collections.Generic; -using Microsoft.DotNet.Tools.Install; -using Microsoft.DotNet.Tools.Update; +using Microsoft.DotNet.Tools.Tool; namespace Microsoft.DotNet.Cli { @@ -147,17 +145,9 @@ namespace Microsoft.DotNet.Cli { Command = ParseCommand.Run }, - ["install"] = new BuiltInCommandMetadata + ["tool"] = new BuiltInCommandMetadata { - Command = InstallCommand.Run - }, - ["uninstall"] = new BuiltInCommandMetadata - { - Command = UninstallCommand.Run - }, - ["update"] = new BuiltInCommandMetadata - { - Command = UpdateCommand.Run + Command = ToolCommand.Run }, ["internal-reportinstallsuccess"] = new BuiltInCommandMetadata { diff --git a/src/dotnet/CommonLocalizableStrings.resx b/src/dotnet/CommonLocalizableStrings.resx index 4215d718e..ad6125977 100644 --- a/src/dotnet/CommonLocalizableStrings.resx +++ b/src/dotnet/CommonLocalizableStrings.resx @@ -118,7 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - Unsupported project type. Please check with your sdk provider. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. Project already has a reference to `{0}`. diff --git a/src/dotnet/Parser.cs b/src/dotnet/Parser.cs index 29f39f9bc..59d356094 100644 --- a/src/dotnet/Parser.cs +++ b/src/dotnet/Parser.cs @@ -55,9 +55,7 @@ namespace Microsoft.DotNet.Cli Create.Command("vstest", ""), CompleteCommandParser.Complete(), InternalReportinstallsuccessCommandParser.InternalReportinstallsuccess(), - InstallCommandParser.Install(), - UninstallCommandParser.Uninstall(), - UpdateCommandParser.Update(), + ToolCommandParser.Tool(), CommonOptions.HelpOption(), Create.Option("--info", ""), Create.Option("-d", ""), diff --git a/src/dotnet/ProjectInstanceExtensions.cs b/src/dotnet/ProjectInstanceExtensions.cs index fdfd41b38..457e83d82 100644 --- a/src/dotnet/ProjectInstanceExtensions.cs +++ b/src/dotnet/ProjectInstanceExtensions.cs @@ -20,31 +20,9 @@ namespace Microsoft.DotNet.Tools.Common return projectGuid.ToString("B").ToUpper(); } - public static string GetProjectTypeGuid(this ProjectInstance projectInstance) + public static string GetDefaultProjectTypeGuid(this ProjectInstance projectInstance) { - string projectTypeGuid = null; - - var projectTypeGuidProperty = projectInstance.GetPropertyValue("ProjectTypeGuid"); - if (!string.IsNullOrEmpty(projectTypeGuidProperty)) - { - projectTypeGuid = projectTypeGuidProperty.Split(';').Last(); - } - else - { - projectTypeGuid = projectInstance.GetPropertyValue("DefaultProjectTypeGuid"); - } - - if (string.IsNullOrEmpty(projectTypeGuid)) - { - //ISSUE: https://github.com/dotnet/sdk/issues/522 - //The real behavior we want (once DefaultProjectTypeGuid support is in) is to throw - //when we cannot find ProjectTypeGuid or DefaultProjectTypeGuid. But for now we - //need to default to the C# one. - //throw new GracefulException(CommonLocalizableStrings.UnsupportedProjectType); - projectTypeGuid = ProjectTypeGuids.CSharpProjectTypeGuid; - } - - return projectTypeGuid; + return projectInstance.GetPropertyValue("DefaultProjectTypeGuid"); } public static IEnumerable GetPlatforms(this ProjectInstance projectInstance) diff --git a/src/dotnet/ProjectRootElementExtensions.cs b/src/dotnet/ProjectRootElementExtensions.cs new file mode 100644 index 000000000..1d7ae3a53 --- /dev/null +++ b/src/dotnet/ProjectRootElementExtensions.cs @@ -0,0 +1,23 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Build.Construction; + +namespace Microsoft.DotNet.Tools.Common +{ + public static class ProjectRootElementExtensions + { + public static string GetProjectTypeGuid(this ProjectRootElement rootElement) + { + return rootElement + .Properties + .FirstOrDefault(p => string.Equals(p.Name, "ProjectTypeGuids", StringComparison.OrdinalIgnoreCase)) + ?.Value + .Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries) + .LastOrDefault(g => !string.IsNullOrWhiteSpace(g)); + } + } +} diff --git a/src/dotnet/SlnFileExtensions.cs b/src/dotnet/SlnFileExtensions.cs index e1d91c224..292c697e4 100644 --- a/src/dotnet/SlnFileExtensions.cs +++ b/src/dotnet/SlnFileExtensions.cs @@ -37,10 +37,12 @@ namespace Microsoft.DotNet.Tools.Common } else { + ProjectRootElement rootElement = null; ProjectInstance projectInstance = null; try { - projectInstance = new ProjectInstance(fullProjectPath); + rootElement = ProjectRootElement.Open(fullProjectPath); + projectInstance = new ProjectInstance(rootElement); } catch (InvalidProjectFileException e) { @@ -54,11 +56,20 @@ namespace Microsoft.DotNet.Tools.Common var slnProject = new SlnProject { Id = projectInstance.GetProjectId(), - TypeGuid = projectInstance.GetProjectTypeGuid(), + TypeGuid = rootElement.GetProjectTypeGuid() ?? projectInstance.GetDefaultProjectTypeGuid(), Name = Path.GetFileNameWithoutExtension(relativeProjectPath), FilePath = relativeProjectPath }; + if (string.IsNullOrEmpty(slnProject.TypeGuid)) + { + Reporter.Error.WriteLine( + string.Format( + CommonLocalizableStrings.UnsupportedProjectType, + projectInstance.FullPath)); + return; + } + // NOTE: The order you create the sections determines the order they are written to the sln // file. In the case of an empty sln file, in order to make sure the solution configurations // section comes first we need to add it first. This doesn't affect correctness but does diff --git a/src/dotnet/ToolPackage/ToolPackageFactory.cs b/src/dotnet/ToolPackage/ToolPackageFactory.cs index f3349db77..49be4af40 100644 --- a/src/dotnet/ToolPackage/ToolPackageFactory.cs +++ b/src/dotnet/ToolPackage/ToolPackageFactory.cs @@ -3,7 +3,7 @@ using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Configurer; -using Microsoft.DotNet.Tools.Install.Tool; +using Microsoft.DotNet.Tools.Tool.Install; using Microsoft.Extensions.EnvironmentAbstractions; namespace Microsoft.DotNet.ToolPackage diff --git a/src/dotnet/commands/dotnet-help/HelpUsageText.cs b/src/dotnet/commands/dotnet-help/HelpUsageText.cs index e8875c7f8..ae461c33a 100644 --- a/src/dotnet/commands/dotnet-help/HelpUsageText.cs +++ b/src/dotnet/commands/dotnet-help/HelpUsageText.cs @@ -28,9 +28,7 @@ path-to-application: msbuild {LocalizableStrings.MsBuildDefinition} vstest {LocalizableStrings.VsTestDefinition} store {LocalizableStrings.StoreDefinition} - install {LocalizableStrings.InstallDefinition} - uninstall {LocalizableStrings.UninstallDefinition} - update {LocalizableStrings.UpdateDefinition} + tool {LocalizableStrings.ToolDefinition} help {LocalizableStrings.HelpDefinition} {LocalizableStrings.CommonOptions}: diff --git a/src/dotnet/commands/dotnet-help/LocalizableStrings.resx b/src/dotnet/commands/dotnet-help/LocalizableStrings.resx index 1c3ad318d..e8aa3f752 100644 --- a/src/dotnet/commands/dotnet-help/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-help/LocalizableStrings.resx @@ -267,13 +267,7 @@ Path to additional deps.json file. - - Installs an item into the development environment. + + Modify tools. - - Uninstalls an item from the development environment. - - - Updates an item in the development environment. - - + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf index 186d1b446..c1f77737b 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.cs.xlf @@ -252,19 +252,9 @@ Ukládá zadaná nastavení do úložiště runtime. - - Installs an item into the development environment. - Nainstaluje položku do vývojového prostředí. - - - - Uninstalls an item from the development environment. - Odinstaluje položku z vývojového prostředí. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf index 018663ad6..6ef28b768 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf @@ -252,19 +252,9 @@ Speichert die angegebenen Assemblys im Runtimespeicher. - - Installs an item into the development environment. - Installiert ein Element in der Entwicklungsumgebung. - - - - Uninstalls an item from the development environment. - Deinstalliert ein Element aus der Entwicklungsumgebung. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf index bcd3332f3..c087f15e6 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf @@ -252,19 +252,9 @@ Almacena los ensamblados especificados en el almacén del tiempo de ejecución. - - Installs an item into the development environment. - Instala un elemento en el entorno de desarrollo. - - - - Uninstalls an item from the development environment. - Desinstala un elemento en el entorno de desarrollo. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf index 4dfdfe158..7ed05b6d4 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf @@ -252,19 +252,9 @@ Stocke les assemblys spécifiés dans le magasin de runtimes. - - Installs an item into the development environment. - Installe un élément dans l'environnement de développement. - - - - Uninstalls an item from the development environment. - Désinstalle un élément dans l'environnement de développement. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf index a0fed482d..ebf7f1a61 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf @@ -252,19 +252,9 @@ Memorizza gli assembly specificati nell'archivio di runtime. - - Installs an item into the development environment. - Installa un elemento nell'ambiente di sviluppo. - - - - Uninstalls an item from the development environment. - Disinstalla un elemento dall'ambiente di sviluppo. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf index d6d7ba00b..c140004e9 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf @@ -252,19 +252,9 @@ 指定されたアセンブリを実行時ストアに格納します。 - - Installs an item into the development environment. - 項目を開発環境にインストールします。 - - - - Uninstalls an item from the development environment. - 項目を開発環境からアンインストールします。 - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf index 110c9a46f..8ae63114c 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf @@ -252,19 +252,9 @@ 지정된 어셈블리를 런타임 저장소에 저장합니다. - - Installs an item into the development environment. - 개발 환경에 항목을 설치합니다. - - - - Uninstalls an item from the development environment. - 개발 환경에서 항목을 제거합니다. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf index 7983dd5f1..dd8049bf7 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf @@ -252,19 +252,9 @@ Przechowuje określone zestawy w magazynie środowiska uruchomieniowego. - - Installs an item into the development environment. - Instaluje element w środowisku deweloperskim. - - - - Uninstalls an item from the development environment. - Odinstalowuje element ze środowiska deweloperskiego. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf index d6285b7ff..7d7dc099e 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf @@ -252,19 +252,9 @@ Armazena os assemblies especificados no repositório de tempo de execução. - - Installs an item into the development environment. - Instala um item no ambiente de desenvolvimento. - - - - Uninstalls an item from the development environment. - Desinstala um item do ambiente de desenvolvimento. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf index ac73dc520..8fd85f944 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf @@ -252,19 +252,9 @@ Он сохраняет указанные сборки в хранилище среды выполнения. - - Installs an item into the development environment. - Устанавливает элемент в среде разработки. - - - - Uninstalls an item from the development environment. - Удаляет элемент из среды разработки. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf index edb9777af..765a2ecfa 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf @@ -252,19 +252,9 @@ Belirtilen bütünleştirilmiş kodları çalışma zamanı deposunda depolar. - - Installs an item into the development environment. - Bir öğeyi geliştirme ortamına yükler. - - - - Uninstalls an item from the development environment. - Bir öğeyi geliştirme ortamından kaldırır. - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf index 93b544f6c..57b5a76d7 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf @@ -252,19 +252,9 @@ 在运行时存储中存储指定的程序集。 - - Installs an item into the development environment. - 将项目安装到开发环境中。 - - - - Uninstalls an item from the development environment. - 从开发环境中卸载项目。 - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf index e43b10609..204a0dcdb 100644 --- a/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf @@ -252,19 +252,9 @@ 將指定組件儲存到執行階段存放區中。 - - Installs an item into the development environment. - 將項目安裝至部署環境。 - - - - Uninstalls an item from the development environment. - 將開發環境的項目解除安裝。 - - - - Updates an item in the development environment. - Updates an item in the development environment. + + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-list/ListCommand.cs b/src/dotnet/commands/dotnet-list/ListCommand.cs index 969a44179..cb0b67bc2 100644 --- a/src/dotnet/commands/dotnet-list/ListCommand.cs +++ b/src/dotnet/commands/dotnet-list/ListCommand.cs @@ -7,7 +7,6 @@ using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools.List.ProjectToProjectReferences; -using Microsoft.DotNet.Tools.List.Tool; namespace Microsoft.DotNet.Tools.List { @@ -24,10 +23,6 @@ namespace Microsoft.DotNet.Tools.List { "reference", o => new ListProjectToProjectReferencesCommand(o, ParseResult) - }, - { - "tool", - o => new ListToolCommand(o["tool"], ParseResult) } }; @@ -36,4 +31,4 @@ namespace Microsoft.DotNet.Tools.List return new ListCommand().RunCommand(args); } } -} \ No newline at end of file +} diff --git a/src/dotnet/commands/dotnet-list/ListCommandParser.cs b/src/dotnet/commands/dotnet-list/ListCommandParser.cs index 1f2bb48d8..5efba7e2c 100644 --- a/src/dotnet/commands/dotnet-list/ListCommandParser.cs +++ b/src/dotnet/commands/dotnet-list/ListCommandParser.cs @@ -4,7 +4,6 @@ using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Tools; using Microsoft.DotNet.Tools.List.ProjectToProjectReferences; -using Microsoft.DotNet.Tools.List.Tool; using LocalizableStrings = Microsoft.DotNet.Tools.List.LocalizableStrings; namespace Microsoft.DotNet.Cli @@ -20,7 +19,6 @@ namespace Microsoft.DotNet.Cli description: CommonLocalizableStrings.ArgumentsProjectDescription) .DefaultToCurrentDirectory(), CommonOptions.HelpOption(), - ListProjectToProjectReferencesCommandParser.ListProjectToProjectReferences(), - ListToolCommandParser.ListTool()); + ListProjectToProjectReferencesCommandParser.ListProjectToProjectReferences()); } } diff --git a/src/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsProvider.cs b/src/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsProvider.cs index 780870494..5bb5ce85d 100644 --- a/src/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsProvider.cs +++ b/src/dotnet/commands/dotnet-run/LaunchSettings/ProjectLaunchSettingsProvider.cs @@ -15,6 +15,11 @@ namespace Microsoft.DotNet.Tools.Run.LaunchSettings { var config = model.ToObject(); + if (!string.IsNullOrEmpty(config.ApplicationUrl)) + { + command.EnvironmentVariable("ASPNETCORE_URLS", config.ApplicationUrl); + } + //For now, ignore everything but the environment variables section foreach (var entry in config.EnvironmentVariables) @@ -24,11 +29,6 @@ namespace Microsoft.DotNet.Tools.Run.LaunchSettings command.EnvironmentVariable(entry.Key, value); } - if (!string.IsNullOrEmpty(config.ApplicationUrl)) - { - command.EnvironmentVariable("ASPNETCORE_URLS", config.ApplicationUrl); - } - return new LaunchSettingsApplyResult(true, null, config.LaunchUrl); } diff --git a/src/dotnet/commands/dotnet-install/LocalizableStrings.resx b/src/dotnet/commands/dotnet-tool/LocalizableStrings.resx similarity index 98% rename from src/dotnet/commands/dotnet-install/LocalizableStrings.resx rename to src/dotnet/commands/dotnet-tool/LocalizableStrings.resx index 75be146a8..13ec6c39b 100644 --- a/src/dotnet/commands/dotnet-install/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-tool/LocalizableStrings.resx @@ -121,6 +121,6 @@ .NET Install Command - Installs an item into the development environment. + Modify tools. - + \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-install/InstallCommand.cs b/src/dotnet/commands/dotnet-tool/ToolCommand.cs similarity index 50% rename from src/dotnet/commands/dotnet-install/InstallCommand.cs rename to src/dotnet/commands/dotnet-tool/ToolCommand.cs index 11e823484..d6ab4ef38 100644 --- a/src/dotnet/commands/dotnet-install/InstallCommand.cs +++ b/src/dotnet/commands/dotnet-tool/ToolCommand.cs @@ -6,13 +6,16 @@ using System.Collections.Generic; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.Tools.Install.Tool; +using Microsoft.DotNet.Tools.Tool.Install; +using Microsoft.DotNet.Tools.Tool.List; +using Microsoft.DotNet.Tools.Tool.Uninstall; +using Microsoft.DotNet.Tools.Tool.Update; -namespace Microsoft.DotNet.Tools.Install +namespace Microsoft.DotNet.Tools.Tool { - public class InstallCommand : DotNetTopLevelCommandBase + public class ToolCommand : DotNetTopLevelCommandBase { - protected override string CommandName => "install"; + protected override string CommandName => "tool"; protected override string FullCommandNameLocalized => LocalizableStrings.InstallFullCommandNameLocalized; protected override string ArgumentName => Constants.ProjectArgumentName; protected override string ArgumentDescriptionLocalized => CommonLocalizableStrings.ArgumentsProjectDescription; @@ -20,15 +23,27 @@ namespace Microsoft.DotNet.Tools.Install internal override Dictionary> SubCommands => new Dictionary> { - ["tool"] = - appliedOption => new InstallToolCommand( - appliedOption["tool"], + ["install"] = + appliedOption => new ToolInstallCommand( + appliedOption["install"], + ParseResult), + ["uninstall"] = + appliedOption => new ToolUninstallCommand( + appliedOption["uninstall"], + ParseResult), + ["update"] = + appliedOption => new ToolUpdateCommand( + appliedOption["update"], + ParseResult), + ["list"] = + appliedOption => new ListToolCommand( + appliedOption["list"], ParseResult) }; public static int Run(string[] args) { - var command = new InstallCommand(); + var command = new ToolCommand(); return command.RunCommand(args); } } diff --git a/src/dotnet/commands/dotnet-install/InstallCommandParser.cs b/src/dotnet/commands/dotnet-tool/ToolCommandParser.cs similarity index 53% rename from src/dotnet/commands/dotnet-install/InstallCommandParser.cs rename to src/dotnet/commands/dotnet-tool/ToolCommandParser.cs index 1d235f31d..e965964d3 100644 --- a/src/dotnet/commands/dotnet-install/InstallCommandParser.cs +++ b/src/dotnet/commands/dotnet-tool/ToolCommandParser.cs @@ -2,20 +2,23 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.DotNet.Cli.CommandLine; -using LocalizableStrings = Microsoft.DotNet.Tools.Install.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.LocalizableStrings; namespace Microsoft.DotNet.Cli { - internal static class InstallCommandParser + internal static class ToolCommandParser { - public static Command Install() + public static Command Tool() { return Create.Command( - "install", + "tool", LocalizableStrings.CommandDescription, Accept.NoArguments(), CommonOptions.HelpOption(), - InstallToolCommandParser.InstallTool()); + ToolInstallCommandParser.ToolInstall(), + ToolUninstallCommandParser.ToolUninstall(), + ToolUpdateCommandParser.ToolUpdate(), + ToolListCommandParser.ToolList()); } } } diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/LocalizableStrings.resx b/src/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/LocalizableStrings.resx rename to src/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/ProjectRestorer.cs b/src/dotnet/commands/dotnet-tool/install/ProjectRestorer.cs similarity index 98% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/ProjectRestorer.cs rename to src/dotnet/commands/dotnet-tool/install/ProjectRestorer.cs index 64a382d1e..dd05db478 100644 --- a/src/dotnet/commands/dotnet-install/dotnet-install-tool/ProjectRestorer.cs +++ b/src/dotnet/commands/dotnet-tool/install/ProjectRestorer.cs @@ -10,7 +10,7 @@ using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.PlatformAbstractions; using Microsoft.Extensions.EnvironmentAbstractions; -namespace Microsoft.DotNet.Tools.Install.Tool +namespace Microsoft.DotNet.Tools.Tool.Install { internal class ProjectRestorer : IProjectRestorer { diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommand.cs b/src/dotnet/commands/dotnet-tool/install/ToolInstallCommand.cs similarity index 98% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommand.cs rename to src/dotnet/commands/dotnet-tool/install/ToolInstallCommand.cs index 36d1d1ab5..0977cd066 100644 --- a/src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommand.cs +++ b/src/dotnet/commands/dotnet-tool/install/ToolInstallCommand.cs @@ -15,12 +15,12 @@ using Microsoft.DotNet.ToolPackage; using Microsoft.Extensions.EnvironmentAbstractions; using NuGet.Versioning; -namespace Microsoft.DotNet.Tools.Install.Tool +namespace Microsoft.DotNet.Tools.Tool.Install { internal delegate IShellShimRepository CreateShellShimRepository(DirectoryPath? nonGlobalLocation = null); internal delegate (IToolPackageStore, IToolPackageInstaller) CreateToolPackageStoreAndInstaller(DirectoryPath? nonGlobalLocation = null); - internal class InstallToolCommand : CommandBase + internal class ToolInstallCommand : CommandBase { private readonly IEnvironmentPathInstruction _environmentPathInstruction; private readonly IReporter _reporter; @@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Tools.Install.Tool private readonly string _verbosity; private readonly string _toolPath; - public InstallToolCommand( + public ToolInstallCommand( AppliedOption appliedCommand, ParseResult parseResult, CreateToolPackageStoreAndInstaller createToolPackageStoreAndInstaller = null, diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommandLowLevelErrorConverter.cs b/src/dotnet/commands/dotnet-tool/install/ToolInstallCommandLowLevelErrorConverter.cs similarity index 97% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommandLowLevelErrorConverter.cs rename to src/dotnet/commands/dotnet-tool/install/ToolInstallCommandLowLevelErrorConverter.cs index ba3910003..e1596b0bb 100644 --- a/src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommandLowLevelErrorConverter.cs +++ b/src/dotnet/commands/dotnet-tool/install/ToolInstallCommandLowLevelErrorConverter.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using Microsoft.DotNet.ShellShim; using Microsoft.DotNet.ToolPackage; -namespace Microsoft.DotNet.Tools.Install.Tool +namespace Microsoft.DotNet.Tools.Tool.Install { internal static class InstallToolCommandLowLevelErrorConverter { diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommandParser.cs b/src/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs similarity index 90% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommandParser.cs rename to src/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs index 6bb80d417..55a128724 100644 --- a/src/dotnet/commands/dotnet-install/dotnet-install-tool/InstallToolCommandParser.cs +++ b/src/dotnet/commands/dotnet-tool/install/ToolInstallCommandParser.cs @@ -2,15 +2,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.DotNet.Cli.CommandLine; -using LocalizableStrings = Microsoft.DotNet.Tools.Install.Tool.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.Install.LocalizableStrings; namespace Microsoft.DotNet.Cli { - internal static class InstallToolCommandParser + internal static class ToolInstallCommandParser { - public static Command InstallTool() + public static Command ToolInstall() { - return Create.Command("tool", + return Create.Command("install", LocalizableStrings.CommandDescription, Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageId) .With(name: LocalizableStrings.PackageIdArgumentName, diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.cs.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.de.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.es.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.fr.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.it.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.ja.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.ko.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.pl.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.pt-BR.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pt-BR.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.ru.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ru.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.tr.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.tr.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.zh-Hans.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hans.xlf diff --git a/src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf similarity index 100% rename from src/dotnet/commands/dotnet-install/dotnet-install-tool/xlf/LocalizableStrings.zh-Hant.xlf rename to src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.zh-Hant.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/LocalizableStrings.resx b/src/dotnet/commands/dotnet-tool/list/LocalizableStrings.resx similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/LocalizableStrings.resx rename to src/dotnet/commands/dotnet-tool/list/LocalizableStrings.resx diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/ListToolCommand.cs b/src/dotnet/commands/dotnet-tool/list/ToolListCommand.cs similarity index 98% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/ListToolCommand.cs rename to src/dotnet/commands/dotnet-tool/list/ToolListCommand.cs index 9d00b45eb..df7616089 100644 --- a/src/dotnet/commands/dotnet-list/dotnet-list-tool/ListToolCommand.cs +++ b/src/dotnet/commands/dotnet-tool/list/ToolListCommand.cs @@ -11,7 +11,7 @@ using Microsoft.DotNet.Configurer; using Microsoft.DotNet.ToolPackage; using Microsoft.Extensions.EnvironmentAbstractions; -namespace Microsoft.DotNet.Tools.List.Tool +namespace Microsoft.DotNet.Tools.Tool.List { internal delegate IToolPackageStore CreateToolPackageStore(DirectoryPath? nonGlobalLocation = null); diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/ListToolCommandParser.cs b/src/dotnet/commands/dotnet-tool/list/ToolListCommandParser.cs similarity index 81% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/ListToolCommandParser.cs rename to src/dotnet/commands/dotnet-tool/list/ToolListCommandParser.cs index b8a5084aa..3144c85fe 100644 --- a/src/dotnet/commands/dotnet-list/dotnet-list-tool/ListToolCommandParser.cs +++ b/src/dotnet/commands/dotnet-tool/list/ToolListCommandParser.cs @@ -2,16 +2,16 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.DotNet.Cli.CommandLine; -using LocalizableStrings = Microsoft.DotNet.Tools.List.Tool.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.List.LocalizableStrings; namespace Microsoft.DotNet.Cli { - internal static class ListToolCommandParser + internal static class ToolListCommandParser { - public static Command ListTool() + public static Command ToolList() { return Create.Command( - "tool", + "list", LocalizableStrings.CommandDescription, Create.Option( "-g|--global", diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.cs.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.cs.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.cs.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.de.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.de.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.de.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.es.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.es.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.es.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.fr.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.fr.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.fr.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.it.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.it.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.it.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.ja.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.ja.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.ja.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.ko.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.ko.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.ko.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.pl.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.pl.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.pl.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.pt-BR.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.pt-BR.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.pt-BR.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.ru.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.ru.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.ru.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.tr.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.tr.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.tr.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.zh-Hans.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.zh-Hans.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.zh-Hans.xlf diff --git a/src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.zh-Hant.xlf similarity index 100% rename from src/dotnet/commands/dotnet-list/dotnet-list-tool/xlf/LocalizableStrings.zh-Hant.xlf rename to src/dotnet/commands/dotnet-tool/list/xlf/LocalizableStrings.zh-Hant.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/LocalizableStrings.resx b/src/dotnet/commands/dotnet-tool/uninstall/LocalizableStrings.resx similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/LocalizableStrings.resx rename to src/dotnet/commands/dotnet-tool/uninstall/LocalizableStrings.resx diff --git a/src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommand.cs b/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommand.cs similarity index 94% rename from src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommand.cs rename to src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommand.cs index 87661cced..3347895e2 100644 --- a/src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommand.cs +++ b/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommand.cs @@ -14,11 +14,11 @@ using Microsoft.DotNet.ShellShim; using Microsoft.DotNet.ToolPackage; using Microsoft.Extensions.EnvironmentAbstractions; -namespace Microsoft.DotNet.Tools.Uninstall.Tool +namespace Microsoft.DotNet.Tools.Tool.Uninstall { internal delegate IShellShimRepository CreateShellShimRepository(DirectoryPath? nonGlobalLocation = null); internal delegate IToolPackageStore CreateToolPackageStore(DirectoryPath? nonGlobalLocation = null); - internal class UninstallToolCommand : CommandBase + internal class ToolUninstallCommand : CommandBase { private readonly AppliedOption _options; private readonly IReporter _reporter; @@ -26,7 +26,7 @@ namespace Microsoft.DotNet.Tools.Uninstall.Tool private CreateShellShimRepository _createShellShimRepository; private CreateToolPackageStore _createToolPackageStore; - public UninstallToolCommand( + public ToolUninstallCommand( AppliedOption options, ParseResult result, CreateToolPackageStore createToolPackageStore = null, @@ -120,10 +120,10 @@ namespace Microsoft.DotNet.Tools.Uninstall.Tool package.Version.ToNormalizedString()).Green()); return 0; } - catch (Exception ex) when (UninstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex)) + catch (Exception ex) when (ToolUninstallCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex)) { throw new GracefulException( - messages: UninstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, packageId), + messages: ToolUninstallCommandLowLevelErrorConverter.GetUserFacingMessages(ex, packageId), verboseMessages: new[] {ex.ToString()}, isUserError: false); } diff --git a/src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommandLowLevelErrorConverter.cs b/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommandLowLevelErrorConverter.cs similarity index 89% rename from src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommandLowLevelErrorConverter.cs rename to src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommandLowLevelErrorConverter.cs index 8169e5171..cf8d421ea 100644 --- a/src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommandLowLevelErrorConverter.cs +++ b/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommandLowLevelErrorConverter.cs @@ -6,9 +6,9 @@ using System.Collections.Generic; using Microsoft.DotNet.ShellShim; using Microsoft.DotNet.ToolPackage; -namespace Microsoft.DotNet.Tools.Uninstall.Tool +namespace Microsoft.DotNet.Tools.Tool.Uninstall { - internal static class UninstallToolCommandLowLevelErrorConverter + internal static class ToolUninstallCommandLowLevelErrorConverter { public static IEnumerable GetUserFacingMessages(Exception ex, PackageId packageId) { @@ -24,7 +24,7 @@ namespace Microsoft.DotNet.Tools.Uninstall.Tool { userFacingMessages = new[] { - String.Format( + string.Format( LocalizableStrings.FailedToUninstallTool, packageId, ex.Message) diff --git a/src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommandParser.cs b/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommandParser.cs similarity index 82% rename from src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommandParser.cs rename to src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommandParser.cs index 028d44a0f..7d1efb54a 100644 --- a/src/dotnet/commands/dotnet-uninstall/tool/UninstallToolCommandParser.cs +++ b/src/dotnet/commands/dotnet-tool/uninstall/ToolUninstallCommandParser.cs @@ -2,15 +2,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.DotNet.Cli.CommandLine; -using LocalizableStrings = Microsoft.DotNet.Tools.Uninstall.Tool.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.Uninstall.LocalizableStrings; namespace Microsoft.DotNet.Cli { - internal static class UninstallToolCommandParser + internal static class ToolUninstallCommandParser { - public static Command UninstallTool() + public static Command ToolUninstall() { - return Create.Command("tool", + return Create.Command("uninstall", LocalizableStrings.CommandDescription, Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageId) .With(name: LocalizableStrings.PackageIdArgumentName, diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.cs.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.cs.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.cs.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.de.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.de.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.de.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.es.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.es.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.es.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.fr.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.fr.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.fr.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.it.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.it.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.it.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.ja.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.ja.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.ja.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.ko.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.ko.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.ko.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.pl.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.pl.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.pl.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.pt-BR.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.pt-BR.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.pt-BR.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.ru.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.ru.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.ru.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.tr.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.tr.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.tr.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.zh-Hans.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.zh-Hans.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.zh-Hans.xlf diff --git a/src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.zh-Hant.xlf similarity index 100% rename from src/dotnet/commands/dotnet-uninstall/tool/xlf/LocalizableStrings.zh-Hant.xlf rename to src/dotnet/commands/dotnet-tool/uninstall/xlf/LocalizableStrings.zh-Hant.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/LocalizableStrings.resx b/src/dotnet/commands/dotnet-tool/update/LocalizableStrings.resx similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/LocalizableStrings.resx rename to src/dotnet/commands/dotnet-tool/update/LocalizableStrings.resx diff --git a/src/dotnet/commands/dotnet-update/tool/UpdateToolCommand.cs b/src/dotnet/commands/dotnet-tool/update/ToolUpdateCommand.cs similarity index 95% rename from src/dotnet/commands/dotnet-update/tool/UpdateToolCommand.cs rename to src/dotnet/commands/dotnet-tool/update/ToolUpdateCommand.cs index 9bfe52902..62034e3ba 100644 --- a/src/dotnet/commands/dotnet-update/tool/UpdateToolCommand.cs +++ b/src/dotnet/commands/dotnet-tool/update/ToolUpdateCommand.cs @@ -11,18 +11,18 @@ using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ShellShim; using Microsoft.DotNet.ToolPackage; -using Microsoft.DotNet.Tools.Install.Tool; -using Microsoft.DotNet.Tools.Uninstall.Tool; +using Microsoft.DotNet.Tools.Tool.Install; +using Microsoft.DotNet.Tools.Tool.Uninstall; using Microsoft.Extensions.EnvironmentAbstractions; -namespace Microsoft.DotNet.Tools.Update.Tool +namespace Microsoft.DotNet.Tools.Tool.Update { internal delegate IShellShimRepository CreateShellShimRepository(DirectoryPath? nonGlobalLocation = null); internal delegate (IToolPackageStore, IToolPackageInstaller) CreateToolPackageStoreAndInstaller( DirectoryPath? nonGlobalLocation = null); - internal class UpdateToolCommand : CommandBase + internal class ToolUpdateCommand : CommandBase { private readonly IReporter _reporter; private readonly IReporter _errorReporter; @@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Tools.Update.Tool private readonly string _verbosity; private readonly string _toolPath; - public UpdateToolCommand(AppliedOption appliedCommand, + public ToolUpdateCommand(AppliedOption appliedCommand, ParseResult parseResult, CreateToolPackageStoreAndInstaller createToolPackageStoreAndInstaller = null, CreateShellShimRepository createShellShimRepository = null, @@ -207,14 +207,14 @@ namespace Microsoft.DotNet.Tools.Update.Tool uninstallAction(); } catch (Exception ex) - when (UninstallToolCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex)) + when (ToolUninstallCommandLowLevelErrorConverter.ShouldConvertToUserFacingError(ex)) { var message = new List { string.Format(LocalizableStrings.UpdateToolFailed, _packageId) }; message.AddRange( - UninstallToolCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId)); + ToolUninstallCommandLowLevelErrorConverter.GetUserFacingMessages(ex, _packageId)); throw new GracefulException( messages: message, diff --git a/src/dotnet/commands/dotnet-update/tool/UpdateToolCommandParser.cs b/src/dotnet/commands/dotnet-tool/update/ToolUpdateCommandParser.cs similarity index 89% rename from src/dotnet/commands/dotnet-update/tool/UpdateToolCommandParser.cs rename to src/dotnet/commands/dotnet-tool/update/ToolUpdateCommandParser.cs index 00f21ceb1..637171188 100644 --- a/src/dotnet/commands/dotnet-update/tool/UpdateToolCommandParser.cs +++ b/src/dotnet/commands/dotnet-tool/update/ToolUpdateCommandParser.cs @@ -2,15 +2,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.DotNet.Cli.CommandLine; -using LocalizableStrings = Microsoft.DotNet.Tools.Update.Tool.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.Update.LocalizableStrings; namespace Microsoft.DotNet.Cli { - internal static class UpdateToolCommandParser + internal static class ToolUpdateCommandParser { - public static Command Update() + public static Command ToolUpdate() { - return Create.Command("tool", + return Create.Command("update", LocalizableStrings.CommandDescription, Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageId) .With(name: LocalizableStrings.PackageIdArgumentName, diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.cs.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.de.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.es.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.fr.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.it.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.ja.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.ko.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.pl.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.pt-BR.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.ru.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.tr.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.zh-Hans.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf diff --git a/src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf similarity index 100% rename from src/dotnet/commands/dotnet-update/tool/xlf/LocalizableStrings.zh-Hant.xlf rename to src/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.cs.xlf similarity index 71% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.cs.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.cs.xlf index 6ea7bd20c..43ca50f49 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.cs.xlf @@ -4,12 +4,12 @@ .NET Install Command - Příkaz Instalovat rozhraní .NET + .NET Install Command - Installs an item into the development environment. - Nainstaluje položku do vývojového prostředí. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.de.xlf similarity index 71% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.de.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.de.xlf index 7d871b47e..519c801a0 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.de.xlf @@ -4,12 +4,12 @@ .NET Install Command - .NET-Installationsbefehl + .NET Install Command - Installs an item into the development environment. - Installiert ein Element in der Entwicklungsumgebung. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.es.xlf similarity index 71% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.es.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.es.xlf index 91724fd74..a1acafb62 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.es.xlf @@ -4,12 +4,12 @@ .NET Install Command - Comando para la instalación de .NET + .NET Install Command - Installs an item into the development environment. - Instala un elemento en el entorno de desarrollo. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.fr.xlf similarity index 70% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.fr.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.fr.xlf index 54b608a2b..b7ee42611 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.fr.xlf @@ -4,12 +4,12 @@ .NET Install Command - Commande d'installation .NET + .NET Install Command - Installs an item into the development environment. - Installe un élément dans l'environnement de développement. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.it.xlf similarity index 71% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.it.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.it.xlf index 2b3e4b41a..f6d82cae4 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.it.xlf @@ -4,12 +4,12 @@ .NET Install Command - Comando di installazione .NET + .NET Install Command - Installs an item into the development environment. - Installa un elemento nell'ambiente di sviluppo. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ja.xlf similarity index 70% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ja.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ja.xlf index d02cab060..85af3a736 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ja.xlf @@ -4,12 +4,12 @@ .NET Install Command - .NET インストール コマンド + .NET Install Command - Installs an item into the development environment. - 項目を開発環境にインストールします。 + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ko.xlf similarity index 73% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ko.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ko.xlf index d21a653d2..df410d0b9 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ko.xlf @@ -4,12 +4,12 @@ .NET Install Command - .NET 설치 명령 + .NET Install Command - Installs an item into the development environment. - 개발 환경에 항목을 설치합니다. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.pl.xlf similarity index 72% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.pl.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.pl.xlf index e10cbde25..4d02180c8 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.pl.xlf @@ -4,12 +4,12 @@ .NET Install Command - Polecenie instalacji .NET + .NET Install Command - Installs an item into the development environment. - Instaluje element w środowisku deweloperskim. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.pt-BR.xlf similarity index 71% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.pt-BR.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.pt-BR.xlf index 6ff812be4..da48d30dd 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.pt-BR.xlf @@ -4,12 +4,12 @@ .NET Install Command - Comando de instalação do .NET + .NET Install Command - Installs an item into the development environment. - Instala um item no ambiente de desenvolvimento. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ru.xlf similarity index 68% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ru.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ru.xlf index 82fced65c..94e368063 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.ru.xlf @@ -4,12 +4,12 @@ .NET Install Command - Команда установки .NET + .NET Install Command - Installs an item into the development environment. - Устанавливает элемент в среде разработки. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.tr.xlf similarity index 73% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.tr.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.tr.xlf index 6ac5ab4a6..d0ae73c52 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.tr.xlf @@ -4,12 +4,12 @@ .NET Install Command - .NET Yükleme Komutu + .NET Install Command - Installs an item into the development environment. - Bir öğeyi geliştirme ortamına yükler. + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.zh-Hans.xlf similarity index 74% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.zh-Hans.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.zh-Hans.xlf index b6cbdbe49..815fb5397 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.zh-Hans.xlf @@ -4,12 +4,12 @@ .NET Install Command - .NET 安装命令 + .NET Install Command - Installs an item into the development environment. - 将项目安装到开发环境中。 + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.zh-Hant.xlf similarity index 74% rename from src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.zh-Hant.xlf rename to src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.zh-Hant.xlf index 4addd8206..c55136c4e 100644 --- a/src/dotnet/commands/dotnet-install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-tool/xlf/LocalizableStrings.zh-Hant.xlf @@ -4,12 +4,12 @@ .NET Install Command - .NET 安裝命令 + .NET Install Command - Installs an item into the development environment. - 將項目安裝至部署環境。 + Modify tools. + Modify tools. diff --git a/src/dotnet/commands/dotnet-uninstall/LocalizableStrings.resx b/src/dotnet/commands/dotnet-uninstall/LocalizableStrings.resx deleted file mode 100644 index 99440a870..000000000 --- a/src/dotnet/commands/dotnet-uninstall/LocalizableStrings.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - .NET Uninstall Command - - - Uninstalls an item from the development environment. - - - The NuGet package identifier of the tool to uninstall. - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/UninstallCommand.cs b/src/dotnet/commands/dotnet-uninstall/UninstallCommand.cs deleted file mode 100644 index 46f6231af..000000000 --- a/src/dotnet/commands/dotnet-uninstall/UninstallCommand.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.Collections.Generic; -using Microsoft.DotNet.Cli; -using Microsoft.DotNet.Cli.CommandLine; -using Microsoft.DotNet.Cli.Utils; -using Microsoft.DotNet.Tools.Uninstall.Tool; - -namespace Microsoft.DotNet.Tools.Uninstall -{ - public class UninstallCommand : DotNetTopLevelCommandBase - { - protected override string CommandName => "uninstall"; - protected override string FullCommandNameLocalized => LocalizableStrings.UninstallFullCommandName; - protected override string ArgumentName => Constants.ToolPackageArgumentName; - protected override string ArgumentDescriptionLocalized => LocalizableStrings.UninstallArgumentDescription; - - internal override Dictionary> SubCommands => - new Dictionary> - { - ["tool"] = options => new UninstallToolCommand(options["tool"], ParseResult) - }; - - public static int Run(string[] args) - { - return new UninstallCommand().RunCommand(args); - } - } -} diff --git a/src/dotnet/commands/dotnet-uninstall/UninstallCommandParser.cs b/src/dotnet/commands/dotnet-uninstall/UninstallCommandParser.cs deleted file mode 100644 index ec6f4aa6a..000000000 --- a/src/dotnet/commands/dotnet-uninstall/UninstallCommandParser.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.DotNet.Cli.CommandLine; -using LocalizableStrings = Microsoft.DotNet.Tools.Uninstall.LocalizableStrings; - -namespace Microsoft.DotNet.Cli -{ - internal static class UninstallCommandParser - { - public static Command Uninstall() - { - return Create.Command( - "uninstall", - LocalizableStrings.CommandDescription, - Accept.NoArguments(), - CommonOptions.HelpOption(), - UninstallToolCommandParser.UninstallTool()); - } - } -} diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.cs.xlf deleted file mode 100644 index 2f716a2ac..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.cs.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - Příkaz k odinstalaci rozhraní .NET - - - - The NuGet package identifier of the tool to uninstall. - Identifikátor balíčku NuGet nástroje, který se má odinstalovat - - - - Uninstalls an item from the development environment. - Odinstaluje položku z vývojového prostředí. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.de.xlf deleted file mode 100644 index 69e060e00..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.de.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - Befehl zur Deinstallation von .NET - - - - The NuGet package identifier of the tool to uninstall. - NuGet-Paketbezeichner des Tools, das deinstalliert werden soll. - - - - Uninstalls an item from the development environment. - Deinstalliert ein Element aus der Entwicklungsumgebung. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.es.xlf deleted file mode 100644 index c0a641af1..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.es.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - Comando para la desinstalación de .NET - - - - The NuGet package identifier of the tool to uninstall. - Identificador del paquete de NuGet de la herramienta que se desinstalará. - - - - Uninstalls an item from the development environment. - Desinstala un elemento en el entorno de desarrollo. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.fr.xlf deleted file mode 100644 index e2f7c1baa..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.fr.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - Commande de désinstallation .NET - - - - The NuGet package identifier of the tool to uninstall. - Identificateur de package NuGet de l'outil à désinstaller. - - - - Uninstalls an item from the development environment. - Désinstalle un élément dans l'environnement de développement. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.it.xlf deleted file mode 100644 index 279d42a9a..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.it.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - Comando di disinstallazione .NET - - - - The NuGet package identifier of the tool to uninstall. - Identificatore del pacchetto NuGet dello strumento da disinstallare. - - - - Uninstalls an item from the development environment. - Disinstalla un elemento dall'ambiente di sviluppo. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ja.xlf deleted file mode 100644 index faa091d5c..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ja.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - .NET アンインストール コマンド - - - - The NuGet package identifier of the tool to uninstall. - アンインストールするツールの NuGet パッケージ ID。 - - - - Uninstalls an item from the development environment. - 項目を開発環境からアンインストールします。 - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ko.xlf deleted file mode 100644 index f85e4370c..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ko.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - .NET 제거 명령 - - - - The NuGet package identifier of the tool to uninstall. - 제거할 도구의 NuGet 패키지 식별자입니다. - - - - Uninstalls an item from the development environment. - 개발 환경에서 항목을 제거합니다. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.pl.xlf deleted file mode 100644 index a8bd1b431..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.pl.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - Polecenie dezinstalacji platformy .NET - - - - The NuGet package identifier of the tool to uninstall. - Identyfikator pakietu NuGet narzędzia do odinstalowania. - - - - Uninstalls an item from the development environment. - Odinstalowuje element ze środowiska deweloperskiego. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.pt-BR.xlf deleted file mode 100644 index be9a2b6d3..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.pt-BR.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - Comando de desinstalação do .NET - - - - The NuGet package identifier of the tool to uninstall. - O identificador do pacote do NuGet da ferramenta a ser desinstalada. - - - - Uninstalls an item from the development environment. - Desinstala um item do ambiente de desenvolvimento. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ru.xlf deleted file mode 100644 index 5fe055778..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.ru.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - Команда удаления .NET - - - - The NuGet package identifier of the tool to uninstall. - Идентификатор пакета NuGet удаляемого инструмента. - - - - Uninstalls an item from the development environment. - Удаляет элемент из среды разработки. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.tr.xlf deleted file mode 100644 index 6c058a453..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.tr.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - .NET Kaldırma Komutu - - - - The NuGet package identifier of the tool to uninstall. - Kaldırılacak aracın NuGet paketi tanımlayıcısı. - - - - Uninstalls an item from the development environment. - Bir öğeyi geliştirme ortamından kaldırır. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.zh-Hans.xlf deleted file mode 100644 index 283659d81..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.zh-Hans.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - .NET 卸载命令 - - - - The NuGet package identifier of the tool to uninstall. - 要卸载的工具的 NuGet 包标识符。 - - - - Uninstalls an item from the development environment. - 从开发环境中卸载项目。 - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.zh-Hant.xlf deleted file mode 100644 index 24e0532e4..000000000 --- a/src/dotnet/commands/dotnet-uninstall/xlf/LocalizableStrings.zh-Hant.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Uninstall Command - .NET 解除安裝命令 - - - - The NuGet package identifier of the tool to uninstall. - 要解除安裝之工具的 NuGet 套件識別碼。 - - - - Uninstalls an item from the development environment. - 將開發環境的項目解除安裝。 - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/LocalizableStrings.resx b/src/dotnet/commands/dotnet-update/LocalizableStrings.resx deleted file mode 100644 index b2c5e6d30..000000000 --- a/src/dotnet/commands/dotnet-update/LocalizableStrings.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - .NET Update Command - - - Updates an item in the development environment. - - - The NuGet package identifier of the tool to update. - - diff --git a/src/dotnet/commands/dotnet-update/UpdateCommand.cs b/src/dotnet/commands/dotnet-update/UpdateCommand.cs deleted file mode 100644 index 2a37ffd1a..000000000 --- a/src/dotnet/commands/dotnet-update/UpdateCommand.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.Collections.Generic; -using Microsoft.DotNet.Cli; -using Microsoft.DotNet.Cli.CommandLine; -using Microsoft.DotNet.Cli.Utils; - -namespace Microsoft.DotNet.Tools.Update -{ - public class UpdateCommand : DotNetTopLevelCommandBase - { - protected override string CommandName => "update"; - protected override string FullCommandNameLocalized => LocalizableStrings.UpdateFullCommandName; - protected override string ArgumentName => Constants.ToolPackageArgumentName; - protected override string ArgumentDescriptionLocalized => LocalizableStrings.UpdateArgumentDescription; - - internal override Dictionary> SubCommands => - new Dictionary> - { - ["tool"] = options => new Tool.UpdateToolCommand(options["tool"], ParseResult) - }; - - public static int Run(string[] args) - { - return new UpdateCommand().RunCommand(args); - } - } -} diff --git a/src/dotnet/commands/dotnet-update/UpdateCommandParser.cs b/src/dotnet/commands/dotnet-update/UpdateCommandParser.cs deleted file mode 100644 index 17c1adfe1..000000000 --- a/src/dotnet/commands/dotnet-update/UpdateCommandParser.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.DotNet.Cli.CommandLine; - -namespace Microsoft.DotNet.Cli -{ - internal static class UpdateCommandParser - { - public static Command Update() - { - return Create.Command( - "update", - Tools.Update.LocalizableStrings.CommandDescription, - Accept.NoArguments(), - CommonOptions.HelpOption(), - UpdateToolCommandParser.Update()); - } - } -} diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.cs.xlf deleted file mode 100644 index ece6d54c0..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.cs.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.de.xlf deleted file mode 100644 index 1d7936f5d..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.de.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.es.xlf deleted file mode 100644 index ead4dc655..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.es.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.fr.xlf deleted file mode 100644 index cef466edd..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.fr.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.it.xlf deleted file mode 100644 index 790f68c1d..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.it.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ja.xlf deleted file mode 100644 index 1832a8731..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ja.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ko.xlf deleted file mode 100644 index aa24da83b..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ko.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.pl.xlf deleted file mode 100644 index 9094f057e..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.pl.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.pt-BR.xlf deleted file mode 100644 index 1247ed8e7..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.pt-BR.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ru.xlf deleted file mode 100644 index c0de3f963..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.ru.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.tr.xlf deleted file mode 100644 index 2053d884a..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.tr.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.zh-Hans.xlf deleted file mode 100644 index 650ec901e..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.zh-Hans.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.zh-Hant.xlf deleted file mode 100644 index f4067e882..000000000 --- a/src/dotnet/commands/dotnet-update/xlf/LocalizableStrings.zh-Hant.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - .NET Update Command - .NET Update Command - - - - Updates an item in the development environment. - Updates an item in the development environment. - - - - The NuGet package identifier of the tool to update. - The NuGet package identifier of the tool to update. - - - - - \ No newline at end of file diff --git a/src/dotnet/dotnet.csproj b/src/dotnet/dotnet.csproj index af0e16264..9705c5802 100644 --- a/src/dotnet/dotnet.csproj +++ b/src/dotnet/dotnet.csproj @@ -16,33 +16,31 @@ - + - - - - + - + - - - - + + + + + diff --git a/src/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/dotnet/xlf/CommonLocalizableStrings.cs.xlf index 168e4b3ae..530f7b87b 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Nepodporovaný typ projektu. Ověřte to prosím u poskytovatele sady SDK. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Nepodporovaný typ projektu. Ověřte to prosím u poskytovatele sady SDK. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/dotnet/xlf/CommonLocalizableStrings.de.xlf index 36a6eab3a..df86a678e 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Nicht unterstützter Projekttyp. Wenden Sie sich an Ihren SDK-Anbieter. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Nicht unterstützter Projekttyp. Wenden Sie sich an Ihren SDK-Anbieter. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/dotnet/xlf/CommonLocalizableStrings.es.xlf index 239e43859..eeeaf4677 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Tipo de proyecto no admitido. Consulte a su proveedor de SDK. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Tipo de proyecto no admitido. Consulte a su proveedor de SDK. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/dotnet/xlf/CommonLocalizableStrings.fr.xlf index 4fe6a8abd..185d6ba1f 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Type de projet non pris en charge. Consultez le fournisseur de votre SDK. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Type de projet non pris en charge. Consultez le fournisseur de votre SDK. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/dotnet/xlf/CommonLocalizableStrings.it.xlf index b70573748..6614c8b26 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Tipo di progetto non supportato. Verificare con il provider SDK. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Tipo di progetto non supportato. Verificare con il provider SDK. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/dotnet/xlf/CommonLocalizableStrings.ja.xlf index 9f4029221..9d3518995 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - サポートされていないプロジェクトの種類です。SDK プロバイダーに確認してください。 + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + サポートされていないプロジェクトの種類です。SDK プロバイダーに確認してください。 diff --git a/src/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/dotnet/xlf/CommonLocalizableStrings.ko.xlf index 9291769c0..db044c92a 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - 지원되지 않는 프로젝트 형식입니다. SDK 공급자를 확인하세요. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + 지원되지 않는 프로젝트 형식입니다. SDK 공급자를 확인하세요. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/dotnet/xlf/CommonLocalizableStrings.pl.xlf index a9ee05177..de47d9779 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Nieobsługiwany typ projektu. Skontaktuj się z dostawcą zestawu SDK. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Nieobsługiwany typ projektu. Skontaktuj się z dostawcą zestawu SDK. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 74e740d5c..dc7b67b8e 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Tipo de projeto sem suporte. Verifique com seu provedor de SDK. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Tipo de projeto sem suporte. Verifique com seu provedor de SDK. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/dotnet/xlf/CommonLocalizableStrings.ru.xlf index 1ba1fd0c8..73111d0eb 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Тип проекта не поддерживается. Обратитесь к поставщику пакета SDK. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Тип проекта не поддерживается. Обратитесь к поставщику пакета SDK. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/dotnet/xlf/CommonLocalizableStrings.tr.xlf index 5e5c301e1..3f6a52a12 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - Proje türü desteklenmiyor. Lütfen SDK sağlayıcınıza başvurun. + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + Proje türü desteklenmiyor. Lütfen SDK sağlayıcınıza başvurun. diff --git a/src/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index 91ade3fab..8729ab7fb 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - 不支持的项目类型。请联系 SDK 提供商。 + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + 不支持的项目类型。请联系 SDK 提供商。 diff --git a/src/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index 8f43162dd..a93c4900e 100644 --- a/src/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -600,8 +600,8 @@ - Unsupported project type. Please check with your sdk provider. - 不支援的專案類型。請與 SDK 提供者連絡。 + Project '{0}' has an unknown project type and cannot be added to the solution file. Please contact your SDK provider for support. + 不支援的專案類型。請與 SDK 提供者連絡。 diff --git a/test/Microsoft.DotNet.ToolPackage.Tests/ToolPackageInstallerTests.cs b/test/Microsoft.DotNet.ToolPackage.Tests/ToolPackageInstallerTests.cs index 848849ba4..3f939f1fe 100644 --- a/test/Microsoft.DotNet.ToolPackage.Tests/ToolPackageInstallerTests.cs +++ b/test/Microsoft.DotNet.ToolPackage.Tests/ToolPackageInstallerTests.cs @@ -12,7 +12,7 @@ using Microsoft.DotNet.Tools.Test.Utilities; using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools; -using Microsoft.DotNet.Tools.Install.Tool; +using Microsoft.DotNet.Tools.Tool.Install; using Microsoft.DotNet.Tools.Tests.ComponentMocks; using Microsoft.Extensions.DependencyModel.Tests; using Microsoft.Extensions.EnvironmentAbstractions; diff --git a/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ProjectRestorerMock.cs b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ProjectRestorerMock.cs index 3e491140f..7d7f34849 100644 --- a/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ProjectRestorerMock.cs +++ b/test/Microsoft.DotNet.Tools.Tests.ComponentMocks/ProjectRestorerMock.cs @@ -9,7 +9,7 @@ using Microsoft.DotNet.Cli; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Tools; -using Microsoft.DotNet.Tools.Install.Tool; +using Microsoft.DotNet.Tools.Tool.Install; using Microsoft.Extensions.EnvironmentAbstractions; using NuGet.Versioning; diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/InstallCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/ToolCommand.cs similarity index 72% rename from test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/InstallCommand.cs rename to test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/ToolCommand.cs index ee1daa874..3a3589f73 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/InstallCommand.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/ToolCommand.cs @@ -5,16 +5,16 @@ using Microsoft.DotNet.Cli.Utils; namespace Microsoft.DotNet.Tools.Test.Utilities { - public sealed class InstallCommand : DotnetCommand + public sealed class ToolCommand : DotnetCommand { public override CommandResult Execute(string args = "") { - return base.Execute($"install {args}"); + return base.Execute($"tool {args}"); } public override CommandResult ExecuteWithCapturedOutput(string args = "") { - return base.ExecuteWithCapturedOutput($"install {args}"); + return base.ExecuteWithCapturedOutput($"tool {args}"); } } } diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs index 46d5303a0..7556b8583 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs @@ -39,9 +39,7 @@ SDK commands: msbuild Runs Microsoft Build Engine (MSBuild). vstest Runs Microsoft Test Execution Command Line Tool. store Stores the specified assemblies in the runtime store. - install Installs an item into the development environment. - uninstall Uninstalls an item from the development environment. - update Updates an item in the development environment. + tool Modify tools. help Show help. Common options: diff --git a/test/dotnet-install-tool.Tests/GivenDotnetInstallTool.cs b/test/dotnet-install-tool.Tests/GivenDotnetInstallTool.cs index 8fecb093d..c5c3988e5 100644 --- a/test/dotnet-install-tool.Tests/GivenDotnetInstallTool.cs +++ b/test/dotnet-install-tool.Tests/GivenDotnetInstallTool.cs @@ -13,8 +13,8 @@ namespace Microsoft.DotNet.Cli.Install.Tests [Fact] public void ItRunsWithQuietVerbosityByDefault() { - var result = new InstallCommand() - .ExecuteWithCapturedOutput("tool -g nonexistent_tool_package"); + var result = new ToolCommand() + .ExecuteWithCapturedOutput("install -g nonexistent_tool_package"); result .Should() @@ -26,8 +26,8 @@ namespace Microsoft.DotNet.Cli.Install.Tests [Fact] public void ItRunsWithTheSpecifiedVerbosity() { - var result = new InstallCommand() - .ExecuteWithCapturedOutput("tool -g -v:m nonexistent_tool_package"); + var result = new ToolCommand() + .ExecuteWithCapturedOutput("install -g -v:m nonexistent_tool_package"); result .Should() diff --git a/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs b/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs index 8cfbc7173..12766e983 100644 --- a/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs +++ b/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs @@ -33,7 +33,6 @@ Options: Commands: reference .NET Core Project-to-Project dependency viewer - tool Lists installed tools in the current development environment. "; const string FrameworkNet451Arg = "-f net451"; diff --git a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateSolutions.cs b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateSolutions.cs index af96bd2a2..585a3da02 100644 --- a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateSolutions.cs +++ b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateSolutions.cs @@ -64,9 +64,7 @@ namespace Microsoft.DotNet.Migration.Tests slnProject.FilePath.Should().Be(Path.Combine("..", "TestLibrary", "TestLibrary.csproj")); slnProject = nonSolutionFolderProjects.Where((p) => p.Name == "subdir").Single(); - //ISSUE: https://github.com/dotnet/sdk/issues/522 - //Once we have that change migrate will always burn in the C# guid - //slnProject.TypeGuid.Should().Be(ProjectTypeGuids.CSharpProjectTypeGuid); + slnProject.TypeGuid.Should().Be(ProjectTypeGuids.CSharpProjectTypeGuid); slnProject.FilePath.Should().Be(Path.Combine("src", "subdir", "subdir.csproj")); } } diff --git a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs index 35660db73..f85d7446e 100644 --- a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs +++ b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs @@ -364,6 +364,66 @@ namespace Microsoft.DotNet.Cli.Run.Tests cmd.StdErr.Should().BeEmpty(); } + [Fact] + public void ItPrefersTheValueOfAppUrlFromEnvVarOverTheProp() + { + var testAppName = "AppWithApplicationUrlInLaunchSettings"; + var testInstance = TestAssets.Get(testAppName) + .CreateInstance() + .WithSourceFiles(); + + var testProjectDirectory = testInstance.Root.FullName; + + new RestoreCommand() + .WithWorkingDirectory(testProjectDirectory) + .Execute("/p:SkipInvalidConfigurations=true") + .Should().Pass(); + + new BuildCommand() + .WithWorkingDirectory(testProjectDirectory) + .Execute() + .Should().Pass(); + + var cmd = new RunCommand() + .WithWorkingDirectory(testProjectDirectory) + .ExecuteWithCapturedOutput("--launch-profile First"); + + cmd.Should().Pass() + .And.HaveStdOutContaining("http://localhost:12345/"); + + cmd.StdErr.Should().BeEmpty(); + } + + [Fact] + public void ItUsesTheValueOfAppUrlIfTheEnvVarIsNotSet() + { + var testAppName = "AppWithApplicationUrlInLaunchSettings"; + var testInstance = TestAssets.Get(testAppName) + .CreateInstance() + .WithSourceFiles(); + + var testProjectDirectory = testInstance.Root.FullName; + + new RestoreCommand() + .WithWorkingDirectory(testProjectDirectory) + .Execute("/p:SkipInvalidConfigurations=true") + .Should().Pass(); + + new BuildCommand() + .WithWorkingDirectory(testProjectDirectory) + .Execute() + .Should().Pass(); + + var cmd = new RunCommand() + .WithWorkingDirectory(testProjectDirectory) + .ExecuteWithCapturedOutput("--launch-profile Second"); + + cmd.Should().Pass() + .And.HaveStdOutContaining("http://localhost:54321/"); + + cmd.StdErr.Should().BeEmpty(); + } + [Fact] public void ItGivesAnErrorWhenTheLaunchProfileNotFound() { diff --git a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs index bb50d5f5d..40f53d567 100644 --- a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs +++ b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs @@ -867,10 +867,9 @@ EndGlobal } [Theory] - //ISSUE: https://github.com/dotnet/sdk/issues/522 - //[InlineData("SlnFileWithNoProjectReferencesAndCSharpProject", "CSharpProject", "CSharpProject.csproj", ProjectTypeGuids.CSharpProjectTypeGuid)] - //[InlineData("SlnFileWithNoProjectReferencesAndFSharpProject", "FSharpProject", "FSharpProject.fsproj", "{F2A71F9B-5D33-465A-A702-920D77279786}")] - //[InlineData("SlnFileWithNoProjectReferencesAndVBProject", "VBProject", "VBProject.vbproj", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}")] + [InlineData("SlnFileWithNoProjectReferencesAndCSharpProject", "CSharpProject", "CSharpProject.csproj", ProjectTypeGuids.CSharpProjectTypeGuid)] + [InlineData("SlnFileWithNoProjectReferencesAndFSharpProject", "FSharpProject", "FSharpProject.fsproj", ProjectTypeGuids.FSharpProjectTypeGuid)] + [InlineData("SlnFileWithNoProjectReferencesAndVBProject", "VBProject", "VBProject.vbproj", ProjectTypeGuids.VBProjectTypeGuid)] [InlineData("SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid", "UnknownProject", "UnknownProject.unknownproj", "{130159A9-F047-44B3-88CF-0CF7F02ED50F}")] [InlineData("SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids", "UnknownProject", "UnknownProject.unknownproj", "{130159A9-F047-44B3-88CF-0CF7F02ED50F}")] public void WhenPassedAProjectItAddsCorrectProjectTypeGuid( @@ -891,8 +890,8 @@ EndGlobal .WithWorkingDirectory(projectDirectory) .ExecuteWithCapturedOutput($"sln App.sln add {projectToAdd}"); cmd.Should().Pass(); - cmd.StdOut.Should().Be(string.Format(CommonLocalizableStrings.ProjectAddedToTheSolution, projectToAdd)); cmd.StdErr.Should().BeEmpty(); + cmd.StdOut.Should().Be(string.Format(CommonLocalizableStrings.ProjectAddedToTheSolution, projectToAdd)); var slnFile = SlnFile.Read(Path.Combine(projectDirectory, "App.sln")); var nonSolutionFolderProjects = slnFile.Projects.Where( @@ -901,6 +900,35 @@ EndGlobal nonSolutionFolderProjects.Single().TypeGuid.Should().Be(expectedTypeGuid); } + [Fact] + public void WhenPassedAProjectWithoutATypeGuidItErrors() + { + var solutionDirectory = TestAssets + .Get("SlnFileWithNoProjectReferencesAndUnknownProjectType") + .CreateInstance() + .WithSourceFiles() + .Root + .FullName; + + var solutionPath = Path.Combine(solutionDirectory, "App.sln"); + var contentBefore = File.ReadAllText(solutionPath); + + var projectToAdd = Path.Combine("UnknownProject", "UnknownProject.unknownproj"); + var cmd = new DotnetCommand() + .WithWorkingDirectory(solutionDirectory) + .ExecuteWithCapturedOutput($"sln add {projectToAdd}"); + cmd.Should().Pass(); + cmd.StdErr.Should().Be( + string.Format( + CommonLocalizableStrings.UnsupportedProjectType, + Path.Combine(solutionDirectory, projectToAdd))); + cmd.StdOut.Should().BeEmpty(); + + File.ReadAllText(solutionPath) + .Should() + .BeVisuallyEquivalentTo(contentBefore); + } + [Fact] private void WhenSlnContainsSolutionFolderWithDifferentCasingItDoesNotCreateDuplicate() { diff --git a/test/dotnet.Tests/CommandTests/InstallToolCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolInstallCommandTests.cs similarity index 79% rename from test/dotnet.Tests/CommandTests/InstallToolCommandTests.cs rename to test/dotnet.Tests/CommandTests/ToolInstallCommandTests.cs index 923b34fa7..89ea673d2 100644 --- a/test/dotnet.Tests/CommandTests/InstallToolCommandTests.cs +++ b/test/dotnet.Tests/CommandTests/ToolInstallCommandTests.cs @@ -11,7 +11,7 @@ using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Tools; -using Microsoft.DotNet.Tools.Install.Tool; +using Microsoft.DotNet.Tools.Tool.Install; using Microsoft.DotNet.Tools.Tests.ComponentMocks; using Microsoft.DotNet.Tools.Test.Utilities; using Microsoft.Extensions.DependencyModel.Tests; @@ -20,12 +20,12 @@ using Newtonsoft.Json; using Xunit; using Parser = Microsoft.DotNet.Cli.Parser; using System.Runtime.InteropServices; -using LocalizableStrings = Microsoft.DotNet.Tools.Install.Tool.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.Install.LocalizableStrings; using Microsoft.DotNet.ShellShim; namespace Microsoft.DotNet.Tests.Commands { - public class InstallToolCommandTests + public class ToolInstallCommandTests { private readonly IFileSystem _fileSystem; private readonly IToolPackageStore _toolPackageStore; @@ -40,7 +40,7 @@ namespace Microsoft.DotNet.Tests.Commands private const string PackageId = "global.tool.console.demo"; private const string PackageVersion = "1.0.4"; - public InstallToolCommandTests() + public ToolInstallCommandTests() { _reporter = new BufferedReporter(); _fileSystem = new FileSystemMockBuilder().Build(); @@ -51,16 +51,16 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim); _createToolPackageStoreAndInstaller = (_) => (_toolPackageStore, CreateToolPackageInstaller()); - ParseResult result = Parser.Instance.Parse($"dotnet install tool -g {PackageId}"); - _appliedCommand = result["dotnet"]["install"]["tool"]; + ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId}"); + _appliedCommand = result["dotnet"]["tool"]["install"]; var parser = Parser.Instance; - _parseResult = parser.ParseFrom("dotnet install", new[] {"tool", PackageId}); + _parseResult = parser.ParseFrom("dotnet tool", new[] {"install", "-g", PackageId}); } [Fact] public void WhenRunWithPackageIdItShouldCreateValidShim() { - var installToolCommand = new InstallToolCommand(_appliedCommand, + var installToolCommand = new ToolInstallCommand(_appliedCommand, _parseResult, _createToolPackageStoreAndInstaller, _createShellShimRepository, @@ -81,10 +81,10 @@ namespace Microsoft.DotNet.Tests.Commands public void WhenRunWithPackageIdWithSourceItShouldCreateValidShim() { const string sourcePath = "http://mysouce.com"; - ParseResult result = Parser.Instance.Parse($"dotnet install tool -g {PackageId} --source-feed {sourcePath}"); - AppliedOption appliedCommand = result["dotnet"]["install"]["tool"]; + ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --source-feed {sourcePath}"); + AppliedOption appliedCommand = result["dotnet"]["tool"]["install"]; ParseResult parseResult = - Parser.Instance.ParseFrom("dotnet install", new[] { "tool", PackageId, "--source-feed", sourcePath }); + Parser.Instance.ParseFrom("dotnet tool", new[] { "install", "-g", PackageId, "--source-feed", sourcePath }); var toolToolPackageInstaller = CreateToolPackageInstaller( @@ -104,14 +104,14 @@ namespace Microsoft.DotNet.Tests.Commands } }); - var installToolCommand = new InstallToolCommand(appliedCommand, + var installCommand = new ToolInstallCommand(appliedCommand, parseResult, (_) => (_toolPackageStore, toolToolPackageInstaller), _createShellShimRepository, _environmentPathInstructionMock, _reporter); - installToolCommand.Execute().Should().Be(0); + installCommand.Execute().Should().Be(0); // It is hard to simulate shell behavior. Only Assert shim can point to executable dll _fileSystem.File.Exists(ExpectedCommandPath()) @@ -125,14 +125,14 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithPackageIdItShouldShowPathInstruction() { - var installToolCommand = new InstallToolCommand(_appliedCommand, + var installCommand = new ToolInstallCommand(_appliedCommand, _parseResult, _createToolPackageStoreAndInstaller, _createShellShimRepository, _environmentPathInstructionMock, _reporter); - installToolCommand.Execute().Should().Be(0); + installCommand.Execute().Should().Be(0); _reporter.Lines.First().Should().Be(EnvironmentPathInstructionMock.MockInstructionText); } @@ -144,7 +144,7 @@ namespace Microsoft.DotNet.Tests.Commands CreateToolPackageInstaller( installCallback: () => throw new ToolPackageException("Simulated error")); - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( _appliedCommand, _parseResult, (_) => (_toolPackageStore, toolPackageInstaller), @@ -152,7 +152,7 @@ namespace Microsoft.DotNet.Tests.Commands _environmentPathInstructionMock, _reporter); - Action a = () => installToolCommand.Execute(); + Action a = () => installCommand.Execute(); a.ShouldThrow().And.Message .Should().Contain( @@ -167,7 +167,7 @@ namespace Microsoft.DotNet.Tests.Commands { _fileSystem.File.CreateEmptyFile(ExpectedCommandPath()); // Create conflict shim - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( _appliedCommand, _parseResult, _createToolPackageStoreAndInstaller, @@ -175,7 +175,7 @@ namespace Microsoft.DotNet.Tests.Commands _environmentPathInstructionMock, _reporter); - Action a = () => installToolCommand.Execute(); + Action a = () => installCommand.Execute(); a.ShouldThrow().And.Message .Should().Contain(string.Format( @@ -192,7 +192,7 @@ namespace Microsoft.DotNet.Tests.Commands CreateToolPackageInstaller( installCallback: () => throw new ToolConfigurationException("Simulated error")); - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( _appliedCommand, _parseResult, (_) => (_toolPackageStore, toolPackageInstaller), @@ -200,7 +200,7 @@ namespace Microsoft.DotNet.Tests.Commands _environmentPathInstructionMock, _reporter); - Action a = () => installToolCommand.Execute(); + Action a = () => installCommand.Execute(); a.ShouldThrow().And.Message .Should().Contain( @@ -214,7 +214,7 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithPackageIdItShouldShowSuccessMessage() { - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( _appliedCommand, _parseResult, _createToolPackageStoreAndInstaller, @@ -222,7 +222,7 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true), _reporter); - installToolCommand.Execute().Should().Be(0); + installCommand.Execute().Should().Be(0); _reporter .Lines @@ -238,10 +238,10 @@ namespace Microsoft.DotNet.Tests.Commands public void WhenRunWithInvalidVersionItShouldThrow() { const string invalidVersion = "!NotValidVersion!"; - ParseResult result = Parser.Instance.Parse($"dotnet install tool -g {PackageId} --version {invalidVersion}"); - AppliedOption appliedCommand = result["dotnet"]["install"]["tool"]; + ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --version {invalidVersion}"); + AppliedOption appliedCommand = result["dotnet"]["tool"]["install"]; - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( appliedCommand, result, _createToolPackageStoreAndInstaller, @@ -249,7 +249,7 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true), _reporter); - Action action = () => installToolCommand.Execute(); + Action action = () => installCommand.Execute(); action .ShouldThrow() @@ -261,10 +261,10 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithExactVersionItShouldSucceed() { - ParseResult result = Parser.Instance.Parse($"dotnet install tool -g {PackageId} --version {PackageVersion}"); - AppliedOption appliedCommand = result["dotnet"]["install"]["tool"]; + ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --version {PackageVersion}"); + AppliedOption appliedCommand = result["dotnet"]["tool"]["install"]; - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( appliedCommand, result, _createToolPackageStoreAndInstaller, @@ -272,7 +272,7 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true), _reporter); - installToolCommand.Execute().Should().Be(0); + installCommand.Execute().Should().Be(0); _reporter .Lines @@ -287,10 +287,10 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithValidVersionRangeItShouldSucceed() { - ParseResult result = Parser.Instance.Parse($"dotnet install tool -g {PackageId} --version [1.0,2.0]"); - AppliedOption appliedCommand = result["dotnet"]["install"]["tool"]; + ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --version [1.0,2.0]"); + AppliedOption appliedCommand = result["dotnet"]["tool"]["install"]; - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( appliedCommand, result, _createToolPackageStoreAndInstaller, @@ -298,7 +298,7 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true), _reporter); - installToolCommand.Execute().Should().Be(0); + installCommand.Execute().Should().Be(0); _reporter .Lines @@ -313,10 +313,10 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithoutAMatchingRangeItShouldFail() { - ParseResult result = Parser.Instance.Parse($"dotnet install tool -g {PackageId} --version [5.0,10.0]"); - AppliedOption appliedCommand = result["dotnet"]["install"]["tool"]; + ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --version [5.0,10.0]"); + AppliedOption appliedCommand = result["dotnet"]["tool"]["install"]; - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( appliedCommand, result, _createToolPackageStoreAndInstaller, @@ -324,7 +324,7 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true), _reporter); - Action a = () => installToolCommand.Execute(); + Action a = () => installCommand.Execute(); a.ShouldThrow().And.Message .Should().Contain( @@ -337,10 +337,10 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithValidVersionWildcardItShouldSucceed() { - ParseResult result = Parser.Instance.Parse($"dotnet install tool -g {PackageId} --version 1.0.*"); - AppliedOption appliedCommand = result["dotnet"]["install"]["tool"]; + ParseResult result = Parser.Instance.Parse($"dotnet tool install -g {PackageId} --version 1.0.*"); + AppliedOption appliedCommand = result["dotnet"]["tool"]["install"]; - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( appliedCommand, result, _createToolPackageStoreAndInstaller, @@ -348,7 +348,7 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true), _reporter); - installToolCommand.Execute().Should().Be(0); + installCommand.Execute().Should().Be(0); _reporter .Lines @@ -363,12 +363,12 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithBothGlobalAndToolPathShowErrorMessage() { - var result = Parser.Instance.Parse($"dotnet install tool -g --tool-path /tmp/folder {PackageId}"); - var appliedCommand = result["dotnet"]["install"]["tool"]; + var result = Parser.Instance.Parse($"dotnet tool install -g --tool-path /tmp/folder {PackageId}"); + var appliedCommand = result["dotnet"]["tool"]["install"]; var parser = Parser.Instance; - var parseResult = parser.ParseFrom("dotnet install", new[] {"tool", PackageId}); + var parseResult = parser.ParseFrom("dotnet tool", new[] {"install", "-g", PackageId}); - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( appliedCommand, parseResult, _createToolPackageStoreAndInstaller, @@ -376,7 +376,7 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true), _reporter); - Action a = () => installToolCommand.Execute(); + Action a = () => installCommand.Execute(); a.ShouldThrow().And.Message .Should().Contain(LocalizableStrings.InstallToolCommandInvalidGlobalAndToolPath); @@ -385,12 +385,12 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithNeitherOfGlobalNorToolPathShowErrorMessage() { - var result = Parser.Instance.Parse($"dotnet install tool {PackageId}"); - var appliedCommand = result["dotnet"]["install"]["tool"]; + var result = Parser.Instance.Parse($"dotnet tool install {PackageId}"); + var appliedCommand = result["dotnet"]["tool"]["install"]; var parser = Parser.Instance; - var parseResult = parser.ParseFrom("dotnet install", new[] { "tool", PackageId }); + var parseResult = parser.ParseFrom("dotnet tool", new[] { "install", "-g", PackageId }); - var installToolCommand = new InstallToolCommand( + var installCommand = new ToolInstallCommand( appliedCommand, parseResult, _createToolPackageStoreAndInstaller, @@ -398,7 +398,7 @@ namespace Microsoft.DotNet.Tests.Commands new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim, true), _reporter); - Action a = () => installToolCommand.Execute(); + Action a = () => installCommand.Execute(); a.ShouldThrow().And.Message .Should().Contain(LocalizableStrings.InstallToolCommandNeedGlobalOrToolPath); @@ -407,19 +407,19 @@ namespace Microsoft.DotNet.Tests.Commands [Fact] public void WhenRunWithPackageIdAndBinPathItShouldNoteHaveEnvironmentPathInstruction() { - var result = Parser.Instance.Parse($"dotnet install tool --tool-path /tmp/folder {PackageId}"); - var appliedCommand = result["dotnet"]["install"]["tool"]; + var result = Parser.Instance.Parse($"dotnet tool install --tool-path /tmp/folder {PackageId}"); + var appliedCommand = result["dotnet"]["tool"]["install"]; var parser = Parser.Instance; - var parseResult = parser.ParseFrom("dotnet install", new[] {"tool", PackageId}); + var parseResult = parser.ParseFrom("dotnet tool", new[] {"install", "-g", PackageId}); - var installToolCommand = new InstallToolCommand(appliedCommand, + var installCommand = new ToolInstallCommand(appliedCommand, parseResult, _createToolPackageStoreAndInstaller, _createShellShimRepository, new EnvironmentPathInstructionMock(_reporter, PathToPlaceShim), _reporter); - installToolCommand.Execute().Should().Be(0); + installCommand.Execute().Should().Be(0); _reporter.Lines.Should().NotContain(l => l.Contains(EnvironmentPathInstructionMock.MockInstructionText)); } diff --git a/test/dotnet.Tests/CommandTests/ListToolCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolListCommandTests.cs similarity index 97% rename from test/dotnet.Tests/CommandTests/ListToolCommandTests.cs rename to test/dotnet.Tests/CommandTests/ToolListCommandTests.cs index 879f37870..d7aca4c96 100644 --- a/test/dotnet.Tests/CommandTests/ListToolCommandTests.cs +++ b/test/dotnet.Tests/CommandTests/ToolListCommandTests.cs @@ -11,7 +11,7 @@ using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Tools; -using Microsoft.DotNet.Tools.List.Tool; +using Microsoft.DotNet.Tools.Tool.List; using Microsoft.DotNet.Tools.Test.Utilities; using Microsoft.Extensions.DependencyModel.Tests; using Microsoft.Extensions.EnvironmentAbstractions; @@ -19,15 +19,15 @@ using Moq; using NuGet.Versioning; using Xunit; using Parser = Microsoft.DotNet.Cli.Parser; -using LocalizableStrings = Microsoft.DotNet.Tools.List.Tool.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.List.LocalizableStrings; namespace Microsoft.DotNet.Tests.Commands { - public class ListToolCommandTests + public class ToolListCommandTests { private readonly BufferedReporter _reporter; - public ListToolCommandTests() + public ToolListCommandTests() { _reporter = new BufferedReporter(); } @@ -241,9 +241,9 @@ namespace Microsoft.DotNet.Tests.Commands private ListToolCommand CreateCommand(IToolPackageStore store, string options = "", string expectedToolPath = null) { - ParseResult result = Parser.Instance.Parse("dotnet list tool " + options); + ParseResult result = Parser.Instance.Parse("dotnet tool list " + options); return new ListToolCommand( - result["dotnet"]["list"]["tool"], + result["dotnet"]["tool"]["list"], result, toolPath => { AssertExpectedToolPath(toolPath, expectedToolPath); return store; }, _reporter); diff --git a/test/dotnet.Tests/CommandTests/UninstallToolCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolUninstallCommandTests.cs similarity index 89% rename from test/dotnet.Tests/CommandTests/UninstallToolCommandTests.cs rename to test/dotnet.Tests/CommandTests/ToolUninstallCommandTests.cs index 4707f8e1c..a9440f0d8 100644 --- a/test/dotnet.Tests/CommandTests/UninstallToolCommandTests.cs +++ b/test/dotnet.Tests/CommandTests/ToolUninstallCommandTests.cs @@ -12,20 +12,20 @@ using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Tools; -using Microsoft.DotNet.Tools.Install.Tool; -using Microsoft.DotNet.Tools.Uninstall.Tool; +using Microsoft.DotNet.Tools.Tool.Install; +using Microsoft.DotNet.Tools.Tool.Uninstall; using Microsoft.DotNet.Tools.Tests.ComponentMocks; using Microsoft.DotNet.Tools.Test.Utilities; using Microsoft.Extensions.DependencyModel.Tests; using Microsoft.Extensions.EnvironmentAbstractions; using Xunit; using Parser = Microsoft.DotNet.Cli.Parser; -using LocalizableStrings = Microsoft.DotNet.Tools.Uninstall.Tool.LocalizableStrings; -using InstallLocalizableStrings = Microsoft.DotNet.Tools.Install.Tool.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.Uninstall.LocalizableStrings; +using InstallLocalizableStrings = Microsoft.DotNet.Tools.Tool.Install.LocalizableStrings; namespace Microsoft.DotNet.Tests.Commands { - public class UninstallToolCommandTests + public class ToolUninstallCommandTests { private readonly BufferedReporter _reporter; private readonly IFileSystem _fileSystem; @@ -36,7 +36,7 @@ namespace Microsoft.DotNet.Tests.Commands private const string ShimsDirectory = "shims"; private const string ToolsDirectory = "tools"; - public UninstallToolCommandTests() + public ToolUninstallCommandTests() { _reporter = new BufferedReporter(); _fileSystem = new FileSystemMockBuilder().Build(); @@ -164,9 +164,9 @@ namespace Microsoft.DotNet.Tests.Commands .Should().Contain(LocalizableStrings.UninstallToolCommandNeedGlobalOrToolPath); } - private InstallToolCommand CreateInstallCommand(string options) + private ToolInstallCommand CreateInstallCommand(string options) { - ParseResult result = Parser.Instance.Parse("dotnet install tool " + options); + ParseResult result = Parser.Instance.Parse("dotnet tool install " + options); var store = new ToolPackageStoreMock(new DirectoryPath(ToolsDirectory), _fileSystem); var packageInstallerMock = new ToolPackageInstallerMock( @@ -176,8 +176,8 @@ namespace Microsoft.DotNet.Tests.Commands _fileSystem, _reporter)); - return new InstallToolCommand( - result["dotnet"]["install"]["tool"], + return new ToolInstallCommand( + result["dotnet"]["tool"]["install"], result, (_) => (store, packageInstallerMock), (_) => new ShellShimRepositoryMock(new DirectoryPath(ShimsDirectory), _fileSystem), @@ -185,12 +185,12 @@ namespace Microsoft.DotNet.Tests.Commands _reporter); } - private UninstallToolCommand CreateUninstallCommand(string options, Action uninstallCallback = null) + private ToolUninstallCommand CreateUninstallCommand(string options, Action uninstallCallback = null) { - ParseResult result = Parser.Instance.Parse("dotnet uninstall tool " + options); + ParseResult result = Parser.Instance.Parse("dotnet tool uninstall " + options); - return new UninstallToolCommand( - result["dotnet"]["uninstall"]["tool"], + return new ToolUninstallCommand( + result["dotnet"]["tool"]["uninstall"], result, (_) => new ToolPackageStoreMock( new DirectoryPath(ToolsDirectory), diff --git a/test/dotnet.Tests/CommandTests/UpdateToolCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolUpdateCommandTests.cs similarity index 87% rename from test/dotnet.Tests/CommandTests/UpdateToolCommandTests.cs rename to test/dotnet.Tests/CommandTests/ToolUpdateCommandTests.cs index 9d2c6e59b..4be734335 100644 --- a/test/dotnet.Tests/CommandTests/UpdateToolCommandTests.cs +++ b/test/dotnet.Tests/CommandTests/ToolUpdateCommandTests.cs @@ -8,19 +8,19 @@ using FluentAssertions; using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ToolPackage; -using Microsoft.DotNet.Tools.Install.Tool; +using Microsoft.DotNet.Tools.Tool.Install; using Microsoft.DotNet.Tools.Tests.ComponentMocks; using Microsoft.DotNet.Tools.Test.Utilities; -using Microsoft.DotNet.Tools.Update.Tool; +using Microsoft.DotNet.Tools.Tool.Update; using Microsoft.Extensions.DependencyModel.Tests; using Microsoft.Extensions.EnvironmentAbstractions; using Xunit; using Parser = Microsoft.DotNet.Cli.Parser; -using LocalizableStrings = Microsoft.DotNet.Tools.Update.Tool.LocalizableStrings; +using LocalizableStrings = Microsoft.DotNet.Tools.Tool.Update.LocalizableStrings; namespace Microsoft.DotNet.Tests.Commands { - public class UpdateToolCommandTests + public class ToolUpdateCommandTests { private readonly BufferedReporter _reporter; private readonly IFileSystem _fileSystem; @@ -33,7 +33,7 @@ namespace Microsoft.DotNet.Tests.Commands private const string ShimsDirectory = "shims"; private const string ToolsDirectory = "tools"; - public UpdateToolCommandTests() + public ToolUpdateCommandTests() { _reporter = new BufferedReporter(); _fileSystem = new FileSystemMockBuilder().Build(); @@ -125,9 +125,9 @@ namespace Microsoft.DotNet.Tests.Commands CreateInstallCommand($"-g {_packageId} --version {LowerPackageVersion}").Execute(); _reporter.Lines.Clear(); - ParseResult result = Parser.Instance.Parse("dotnet update tool " + $"-g {_packageId}"); - var command = new UpdateToolCommand( - result["dotnet"]["update"]["tool"], + ParseResult result = Parser.Instance.Parse("dotnet tool update " + $"-g {_packageId}"); + var command = new ToolUpdateCommand( + result["dotnet"]["tool"]["update"], result, _ => (_store, new ToolPackageInstallerMock( @@ -145,7 +145,7 @@ namespace Microsoft.DotNet.Tests.Commands Action a = () => command.Execute(); a.ShouldThrow().And.Message.Should().Contain( string.Format(LocalizableStrings.UpdateToolFailed, _packageId) + Environment.NewLine + - string.Format(Tools.Install.Tool.LocalizableStrings.InvalidToolConfiguration, "Simulated error")); + string.Format(Tools.Tool.Install.LocalizableStrings.InvalidToolConfiguration, "Simulated error")); } [Fact] @@ -154,9 +154,9 @@ namespace Microsoft.DotNet.Tests.Commands CreateInstallCommand($"-g {_packageId} --version {LowerPackageVersion}").Execute(); _reporter.Lines.Clear(); - ParseResult result = Parser.Instance.Parse("dotnet update tool " + $"-g {_packageId}"); - var command = new UpdateToolCommand( - result["dotnet"]["update"]["tool"], + ParseResult result = Parser.Instance.Parse("dotnet tool update " + $"-g {_packageId}"); + var command = new ToolUpdateCommand( + result["dotnet"]["tool"]["update"], result, _ => (_store, new ToolPackageInstallerMock( @@ -201,12 +201,12 @@ namespace Microsoft.DotNet.Tests.Commands LocalizableStrings.UpdateToolCommandNeedGlobalOrToolPath); } - private InstallToolCommand CreateInstallCommand(string options) + private ToolInstallCommand CreateInstallCommand(string options) { - ParseResult result = Parser.Instance.Parse("dotnet install tool " + options); + ParseResult result = Parser.Instance.Parse("dotnet tool install " + options); - return new InstallToolCommand( - result["dotnet"]["install"]["tool"], + return new ToolInstallCommand( + result["dotnet"]["tool"]["install"], result, (_) => (_store, new ToolPackageInstallerMock( _fileSystem, @@ -221,12 +221,12 @@ namespace Microsoft.DotNet.Tests.Commands _reporter); } - private UpdateToolCommand CreateUpdateCommand(string options) + private ToolUpdateCommand CreateUpdateCommand(string options) { - ParseResult result = Parser.Instance.Parse("dotnet update tool " + options); + ParseResult result = Parser.Instance.Parse("dotnet tool update " + options); - return new UpdateToolCommand( - result["dotnet"]["update"]["tool"], + return new ToolUpdateCommand( + result["dotnet"]["tool"]["update"], result, (_) => (_store, new ToolPackageInstallerMock( _fileSystem, diff --git a/test/dotnet.Tests/ParserTests/InstallToolParserTests.cs b/test/dotnet.Tests/ParserTests/InstallToolParserTests.cs index 7750d380b..61134ae03 100644 --- a/test/dotnet.Tests/ParserTests/InstallToolParserTests.cs +++ b/test/dotnet.Tests/ParserTests/InstallToolParserTests.cs @@ -24,9 +24,9 @@ namespace Microsoft.DotNet.Tests.ParserTests public void InstallGlobaltoolParserCanGetPackageIdAndPackageVersion() { var command = Parser.Instance; - var result = command.Parse("dotnet install tool -g console.test.app --version 1.0.1"); + var result = command.Parse("dotnet tool install -g console.test.app --version 1.0.1"); - var parseResult = result["dotnet"]["install"]["tool"]; + var parseResult = result["dotnet"]["tool"]["install"]; var packageId = parseResult.Arguments.Single(); var packageVersion = parseResult.ValueOrDefault("version"); @@ -41,9 +41,9 @@ namespace Microsoft.DotNet.Tests.ParserTests var command = Parser.Instance; var result = command.Parse( - @"dotnet install tool -g console.test.app --version 1.0.1 --framework netcoreapp2.0 --configfile C:\TestAssetLocalNugetFeed"); + @"dotnet tool install -g console.test.app --version 1.0.1 --framework netcoreapp2.0 --configfile C:\TestAssetLocalNugetFeed"); - var parseResult = result["dotnet"]["install"]["tool"]; + var parseResult = result["dotnet"]["tool"]["install"]; parseResult.ValueOrDefault("configfile").Should().Be(@"C:\TestAssetLocalNugetFeed"); parseResult.ValueOrDefault("framework").Should().Be("netcoreapp2.0"); @@ -55,9 +55,9 @@ namespace Microsoft.DotNet.Tests.ParserTests const string expectedSourceValue = "TestSourceValue"; var result = - Parser.Instance.Parse($"dotnet install tool -g --source-feed {expectedSourceValue} console.test.app"); + Parser.Instance.Parse($"dotnet tool install -g --source-feed {expectedSourceValue} console.test.app"); - var appliedOptions = result["dotnet"]["install"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["install"]; appliedOptions.ValueOrDefault("source-feed").First().Should().Be(expectedSourceValue); } @@ -69,11 +69,11 @@ namespace Microsoft.DotNet.Tests.ParserTests var result = Parser.Instance.Parse( - $"dotnet install tool -g " + + $"dotnet tool install -g " + $"--source-feed {expectedSourceValue1} " + $"--source-feed {expectedSourceValue2} console.test.app"); - var appliedOptions = result["dotnet"]["install"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["install"]; appliedOptions.ValueOrDefault("source-feed")[0].Should().Be(expectedSourceValue1); appliedOptions.ValueOrDefault("source-feed")[1].Should().Be(expectedSourceValue2); @@ -82,9 +82,9 @@ namespace Microsoft.DotNet.Tests.ParserTests [Fact] public void InstallToolParserCanGetGlobalOption() { - var result = Parser.Instance.Parse("dotnet install tool -g console.test.app"); + var result = Parser.Instance.Parse("dotnet tool install -g console.test.app"); - var appliedOptions = result["dotnet"]["install"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["install"]; appliedOptions.ValueOrDefault("global").Should().Be(true); } @@ -93,19 +93,19 @@ namespace Microsoft.DotNet.Tests.ParserTests { const string expectedVerbosityLevel = "diag"; - var result = Parser.Instance.Parse($"dotnet install tool -g --verbosity:{expectedVerbosityLevel} console.test.app"); + var result = Parser.Instance.Parse($"dotnet tool install -g --verbosity:{expectedVerbosityLevel} console.test.app"); - var appliedOptions = result["dotnet"]["install"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["install"]; appliedOptions.SingleArgumentOrDefault("verbosity").Should().Be(expectedVerbosityLevel); } - + [Fact] public void InstallToolParserCanParseToolPathOption() { var result = - Parser.Instance.Parse(@"dotnet install tool --tool-path C:\Tools console.test.app"); + Parser.Instance.Parse(@"dotnet tool install --tool-path C:\Tools console.test.app"); - var appliedOptions = result["dotnet"]["install"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["install"]; appliedOptions.SingleArgumentOrDefault("tool-path").Should().Be(@"C:\Tools"); } } diff --git a/test/dotnet.Tests/ParserTests/ListToolParserTests.cs b/test/dotnet.Tests/ParserTests/ListToolParserTests.cs index b538f8eab..d55b67e92 100644 --- a/test/dotnet.Tests/ParserTests/ListToolParserTests.cs +++ b/test/dotnet.Tests/ParserTests/ListToolParserTests.cs @@ -23,9 +23,9 @@ namespace Microsoft.DotNet.Tests.ParserTests [Fact] public void ListToolParserCanGetGlobalOption() { - var result = Parser.Instance.Parse("dotnet list tool -g"); + var result = Parser.Instance.Parse("dotnet tool list -g"); - var appliedOptions = result["dotnet"]["list"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["list"]; appliedOptions.ValueOrDefault("global").Should().Be(true); } @@ -33,9 +33,9 @@ namespace Microsoft.DotNet.Tests.ParserTests public void ListToolParserCanParseToolPathOption() { var result = - Parser.Instance.Parse(@"dotnet list tool --tool-path C:\Tools "); + Parser.Instance.Parse(@"dotnet tool list --tool-path C:\Tools "); - var appliedOptions = result["dotnet"]["list"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["list"]; appliedOptions.SingleArgumentOrDefault("tool-path").Should().Be(@"C:\Tools"); } } diff --git a/test/dotnet.Tests/ParserTests/UninstallToolParserTests.cs b/test/dotnet.Tests/ParserTests/UninstallToolParserTests.cs index ace3874d4..a61616f60 100644 --- a/test/dotnet.Tests/ParserTests/UninstallToolParserTests.cs +++ b/test/dotnet.Tests/ParserTests/UninstallToolParserTests.cs @@ -24,9 +24,9 @@ namespace Microsoft.DotNet.Tests.ParserTests public void UninstallToolParserCanGetPackageId() { var command = Parser.Instance; - var result = command.Parse("dotnet uninstall tool -g console.test.app"); + var result = command.Parse("dotnet tool uninstall -g console.test.app"); - var parseResult = result["dotnet"]["uninstall"]["tool"]; + var parseResult = result["dotnet"]["tool"]["uninstall"]; var packageId = parseResult.Arguments.Single(); @@ -36,9 +36,9 @@ namespace Microsoft.DotNet.Tests.ParserTests [Fact] public void UninstallToolParserCanGetGlobalOption() { - var result = Parser.Instance.Parse("dotnet uninstall tool -g console.test.app"); + var result = Parser.Instance.Parse("dotnet tool uninstall -g console.test.app"); - var appliedOptions = result["dotnet"]["uninstall"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["uninstall"]; appliedOptions.ValueOrDefault("global").Should().Be(true); } @@ -46,9 +46,9 @@ namespace Microsoft.DotNet.Tests.ParserTests public void UninstallToolParserCanParseToolPathOption() { var result = - Parser.Instance.Parse(@"dotnet uninstall tool --tool-path C:\Tools console.test.app"); + Parser.Instance.Parse(@"dotnet tool uninstall --tool-path C:\Tools console.test.app"); - var appliedOptions = result["dotnet"]["uninstall"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["uninstall"]; appliedOptions.SingleArgumentOrDefault("tool-path").Should().Be(@"C:\Tools"); } } diff --git a/test/dotnet.Tests/ParserTests/UpdateToolParserTests.cs b/test/dotnet.Tests/ParserTests/UpdateToolParserTests.cs index b0c7b529e..4f94dc86e 100644 --- a/test/dotnet.Tests/ParserTests/UpdateToolParserTests.cs +++ b/test/dotnet.Tests/ParserTests/UpdateToolParserTests.cs @@ -24,9 +24,9 @@ namespace Microsoft.DotNet.Tests.ParserTests public void UpdateGlobaltoolParserCanGetPackageId() { var command = Parser.Instance; - var result = command.Parse("dotnet update tool -g console.test.app"); + var result = command.Parse("dotnet tool update -g console.test.app"); - var parseResult = result["dotnet"]["update"]["tool"]; + var parseResult = result["dotnet"]["tool"]["update"]; var packageId = parseResult.Arguments.Single(); @@ -36,9 +36,9 @@ namespace Microsoft.DotNet.Tests.ParserTests [Fact] public void UpdateToolParserCanGetGlobalOption() { - var result = Parser.Instance.Parse("dotnet update tool -g console.test.app"); + var result = Parser.Instance.Parse("dotnet tool update -g console.test.app"); - var appliedOptions = result["dotnet"]["update"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["update"]; appliedOptions.ValueOrDefault("global").Should().Be(true); } @@ -48,9 +48,9 @@ namespace Microsoft.DotNet.Tests.ParserTests var command = Parser.Instance; var result = command.Parse( - @"dotnet update tool -g console.test.app --version 1.0.1 --framework netcoreapp2.0 --configfile C:\TestAssetLocalNugetFeed"); + @"dotnet tool update -g console.test.app --version 1.0.1 --framework netcoreapp2.0 --configfile C:\TestAssetLocalNugetFeed"); - var parseResult = result["dotnet"]["update"]["tool"]; + var parseResult = result["dotnet"]["tool"]["update"]; parseResult.ValueOrDefault("configfile").Should().Be(@"C:\TestAssetLocalNugetFeed"); parseResult.ValueOrDefault("framework").Should().Be("netcoreapp2.0"); @@ -62,9 +62,9 @@ namespace Microsoft.DotNet.Tests.ParserTests const string expectedSourceValue = "TestSourceValue"; var result = - Parser.Instance.Parse($"dotnet update tool -g --source-feed {expectedSourceValue} console.test.app"); + Parser.Instance.Parse($"dotnet tool update -g --source-feed {expectedSourceValue} console.test.app"); - var appliedOptions = result["dotnet"]["update"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["update"]; appliedOptions.ValueOrDefault("source-feed").First().Should().Be(expectedSourceValue); } @@ -76,11 +76,11 @@ namespace Microsoft.DotNet.Tests.ParserTests var result = Parser.Instance.Parse( - $"dotnet update tool -g " + + $"dotnet tool update -g " + $"--source-feed {expectedSourceValue1} " + $"--source-feed {expectedSourceValue2} console.test.app"); - var appliedOptions = result["dotnet"]["update"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["update"]; appliedOptions.ValueOrDefault("source-feed")[0].Should().Be(expectedSourceValue1); appliedOptions.ValueOrDefault("source-feed")[1].Should().Be(expectedSourceValue2); @@ -92,9 +92,9 @@ namespace Microsoft.DotNet.Tests.ParserTests const string expectedVerbosityLevel = "diag"; var result = - Parser.Instance.Parse($"dotnet update tool -g --verbosity:{expectedVerbosityLevel} console.test.app"); + Parser.Instance.Parse($"dotnet tool update -g --verbosity:{expectedVerbosityLevel} console.test.app"); - var appliedOptions = result["dotnet"]["update"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["update"]; appliedOptions.SingleArgumentOrDefault("verbosity").Should().Be(expectedVerbosityLevel); } @@ -102,9 +102,9 @@ namespace Microsoft.DotNet.Tests.ParserTests public void UpdateToolParserCanParseToolPathOption() { var result = - Parser.Instance.Parse(@"dotnet update tool --tool-path C:\TestAssetLocalNugetFeed console.test.app"); + Parser.Instance.Parse(@"dotnet tool update --tool-path C:\TestAssetLocalNugetFeed console.test.app"); - var appliedOptions = result["dotnet"]["update"]["tool"]; + var appliedOptions = result["dotnet"]["tool"]["update"]; appliedOptions.SingleArgumentOrDefault("tool-path").Should().Be(@"C:\TestAssetLocalNugetFeed"); } }