From 34d0900a34d69acfa26c34fb83f859230e053fde Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Mon, 26 Jun 2017 15:49:11 -0700 Subject: [PATCH 1/3] Use latest command line parser --- .../DotnetDependencyToolInvokerParser.cs | 3 +-- build/DependencyVersions.props | 2 +- src/dotnet/CommonOptions.cs | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/DotnetDependencyToolInvokerParser.cs b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/DotnetDependencyToolInvokerParser.cs index 31f29c70f..7c5f1090e 100644 --- a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/DotnetDependencyToolInvokerParser.cs +++ b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/DotnetDependencyToolInvokerParser.cs @@ -23,8 +23,7 @@ namespace Microsoft.DotNet.Tools.DependencyInvoker Create.Option( "-h|--help", "Show help information", - Accept.NoArguments(), - materialize: o => o.Option.Command().HelpView()), + Accept.NoArguments()), Create.Option( "-p|--project-path", "Path to Project.json that contains the tool dependency", diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index ffd207bb1..3896261e9 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -27,7 +27,7 @@ 1.0.0-beta2-20170620-266 2.0.0-preview3-25426-01 2.0.0-preview3-25426-01 - 0.1.0-alpha-142 + 0.1.1-alpha-167 1.2.1-alpha-002133 0.2.0 1.0.0-preview-000321 diff --git a/src/dotnet/CommonOptions.cs b/src/dotnet/CommonOptions.cs index e3103b64c..bcd3b2268 100644 --- a/src/dotnet/CommonOptions.cs +++ b/src/dotnet/CommonOptions.cs @@ -13,8 +13,7 @@ namespace Microsoft.DotNet.Cli Create.Option( "-h|--help", CommonLocalizableStrings.ShowHelpDescription, - Accept.NoArguments(), - materialize: o => o.Option.Command().HelpView()); + Accept.NoArguments()); public static Option VerbosityOption() => Create.Option( From a115df95437044747770e3f1b68d90e7c5aad1a4 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Mon, 26 Jun 2017 17:17:51 -0700 Subject: [PATCH 2/3] Adjust help message test expectations to match new parser --- .../dotnet-add-reference.Tests/GivenDotnetAddReference.cs | 8 ++------ .../GivenThatIWantToShowHelpForDotnetHelpCommand.cs | 4 +--- .../GivenDotnetListReference.cs | 8 ++------ .../GivenDotnetRemovePackage.cs | 8 ++------ .../dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs | 8 ++------ test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs | 8 ++------ test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs | 8 ++------ test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs | 8 ++------ 8 files changed, 15 insertions(+), 45 deletions(-) diff --git a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs index 42545e31c..239761d82 100644 --- a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs +++ b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs @@ -15,9 +15,7 @@ namespace Microsoft.DotNet.Cli.Add.Reference.Tests { public class GivenDotnetAddReference : TestBase { - private const string HelpText = @".NET Add Project to Project reference Command - -Usage: dotnet add reference [options] + private const string HelpText = @"Usage: dotnet add reference [options] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -28,9 +26,7 @@ Options: -f, --framework Add reference only when targeting a specific framework "; - private const string AddCommandHelpText = @".NET Add Command - -Usage: dotnet add [options] [command] + private const string AddCommandHelpText = @"Usage: dotnet add [options] [command] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. diff --git a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetHelpCommand.cs b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetHelpCommand.cs index ab13b7f9c..7561f1b3e 100644 --- a/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetHelpCommand.cs +++ b/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetHelpCommand.cs @@ -11,9 +11,7 @@ namespace Microsoft.DotNet.Help.Tests public class GivenThatIWantToShowHelpForDotnetHelpCommand : TestBase { private const string HelpText = -@".NET CLI help utility - -Usage: dotnet help [options] +@"Usage: dotnet help [options] Arguments: CLI command for which to view more detailed help. diff --git a/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs b/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs index 7d55ff688..fcdd6c54c 100644 --- a/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs +++ b/test/dotnet-list-reference.Tests/GivenDotnetListReference.cs @@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.List.Reference.Tests { public class GivenDotnetListReference : TestBase { - private const string HelpText = @".NET Core Project-to-Project dependency viewer - -Usage: dotnet list reference [options] + private const string HelpText = @"Usage: dotnet list reference [options] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -25,9 +23,7 @@ Options: -h, --help Show help information. "; - private const string ListCommandHelpText = @".NET List Command - -Usage: dotnet list [options] [command] + private const string ListCommandHelpText = @"Usage: dotnet list [options] [command] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. diff --git a/test/dotnet-remove-package.Tests/GivenDotnetRemovePackage.cs b/test/dotnet-remove-package.Tests/GivenDotnetRemovePackage.cs index 43dd1af98..0ff55170f 100644 --- a/test/dotnet-remove-package.Tests/GivenDotnetRemovePackage.cs +++ b/test/dotnet-remove-package.Tests/GivenDotnetRemovePackage.cs @@ -12,9 +12,7 @@ namespace Microsoft.DotNet.Cli.Remove.Package.Tests { public class GivenDotnetRemovePackage : TestBase { - private const string HelpText = @".NET Remove Package reference Command. - -Usage: dotnet remove package [options] + private const string HelpText = @"Usage: dotnet remove package [options] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -24,9 +22,7 @@ Options: -h, --help Show help information. "; - private const string RemoveCommandHelpText = @".NET Remove Command - -Usage: dotnet remove [options] [command] + private const string RemoveCommandHelpText = @"Usage: dotnet remove [options] [command] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. diff --git a/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs b/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs index 0a61664fc..5411f2898 100644 --- a/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs +++ b/test/dotnet-remove-reference.Tests/GivenDotnetRemoveP2P.cs @@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Remove.Reference.Tests { public class GivenDotnetRemoveReference : TestBase { - private const string HelpText = @".NET Remove Project to Project reference Command - -Usage: dotnet remove reference [options] + private const string HelpText = @"Usage: dotnet remove reference [options] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. @@ -27,9 +25,7 @@ Options: -f, --framework Remove reference only when targeting a specific framework "; - private const string RemoveCommandHelpText = @".NET Remove Command - -Usage: dotnet remove [options] [command] + private const string RemoveCommandHelpText = @"Usage: dotnet remove [options] [command] Arguments: The project file to operate on. If a file is not specified, the command will search the current directory for one. diff --git a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs index af2678e06..b35b7950a 100644 --- a/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs +++ b/test/dotnet-sln-add.Tests/GivenDotnetSlnAdd.cs @@ -16,9 +16,7 @@ namespace Microsoft.DotNet.Cli.Sln.Add.Tests { public class GivenDotnetSlnAdd : TestBase { - private string HelpText = @".NET Add project(s) to a solution file Command - -Usage: dotnet sln add [options] + private string HelpText = @"Usage: dotnet sln add [options] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -28,9 +26,7 @@ Options: -h, --help Show help information. "; - private const string SlnCommandHelpText = @".NET modify solution file command - -Usage: dotnet sln [options] [command] + private const string SlnCommandHelpText = @"Usage: dotnet sln [options] [command] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. diff --git a/test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs b/test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs index e0800974d..c0cbd6047 100644 --- a/test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs +++ b/test/dotnet-sln-list.Tests/GivenDotnetSlnList.cs @@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Sln.List.Tests { public class GivenDotnetSlnList : TestBase { - private const string HelpText = @".NET List project(s) in a solution file Command - -Usage: dotnet sln list [options] + private const string HelpText = @"Usage: dotnet sln list [options] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -25,9 +23,7 @@ Options: -h, --help Show help information. "; - private const string SlnCommandHelpText = @".NET modify solution file command - -Usage: dotnet sln [options] [command] + private const string SlnCommandHelpText = @"Usage: dotnet sln [options] [command] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. diff --git a/test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs b/test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs index f0d190fbb..095d1e375 100644 --- a/test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs +++ b/test/dotnet-sln-remove.Tests/GivenDotnetSlnRemove.cs @@ -14,9 +14,7 @@ namespace Microsoft.DotNet.Cli.Sln.Remove.Tests { public class GivenDotnetSlnRemove : TestBase { - private const string HelpText = @".NET Remove project(s) from a solution file Command - -Usage: dotnet sln remove [options] + private const string HelpText = @"Usage: dotnet sln remove [options] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. @@ -26,9 +24,7 @@ Options: -h, --help Show help information. "; - private const string SlnCommandHelpText = @".NET modify solution file command - -Usage: dotnet sln [options] [command] + private const string SlnCommandHelpText = @"Usage: dotnet sln [options] [command] Arguments: Solution file to operate on. If not specified, the command will search the current directory for one. From 7c928a9f18f81001e586e5bf0411f9bfa92e30d4 Mon Sep 17 00:00:00 2001 From: Livar Date: Tue, 27 Jun 2017 14:27:20 -0700 Subject: [PATCH 3/3] Update Microsoft.NET.SDK to 2.0.0-preview3-20170622-1 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index ffd207bb1..4975a8654 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -12,7 +12,7 @@ - 2.0.0-preview2-20170615-7 + 2.0.0-preview3-20170622-1 $(CLI_NETSDK_Version) 4.3.0-preview3-4168