diff --git a/src/Tools/dotnet-user-secrets/src/CommandLineOptions.cs b/src/Tools/dotnet-user-secrets/src/CommandLineOptions.cs index 8495b6de9d..7d998f77d7 100644 --- a/src/Tools/dotnet-user-secrets/src/CommandLineOptions.cs +++ b/src/Tools/dotnet-user-secrets/src/CommandLineOptions.cs @@ -19,7 +19,7 @@ namespace Microsoft.Extensions.SecretManager.Tools public static CommandLineOptions Parse(string[] args, IConsole console) { - var app = new CommandLineApplication() + var app = new CommandLineApplication(treatUnmatchedOptionsAsArguments: true) { Out = console.Out, Error = console.Error, diff --git a/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs b/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs index 8d62c065d9..c3633b57be 100644 --- a/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs +++ b/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs @@ -93,7 +93,9 @@ namespace Microsoft.Extensions.SecretManager.Tools.Tests new KeyValuePair("key1", Guid.NewGuid().ToString()), new KeyValuePair("Facebook:AppId", Guid.NewGuid().ToString()), new KeyValuePair(@"key-@\/.~123!#$%^&*())-+==", @"key-@\/.~123!#$%^&*())-+=="), - new KeyValuePair("key2", string.Empty) + new KeyValuePair("key2", string.Empty), + new KeyValuePair("-oneDashedKey", "-oneDashedValue"), + new KeyValuePair("--twoDashedKey", "--twoDashedValue") }; var projectPath = _fixture.GetTempSecretProject();