这是我的第一篇文章,对任何错误表示歉意。一元运算符“ - ”后缺少表达式
我跑在Windows PowerShell中DOTNET命令,它给了我如何使用它的说明:
Usage: dotnet [host-options] [command] [arguments] [common-options]
Common options:
-v|--verbose Enable verbose output
-h|--help Show help
当我运行命令
dotnet run -h|--help
它给我的以下错误:
At line:1 char:17
+ dotnet run -h|--help
+ ~
Missing expression after unary operator '--'.
At line:1 char:15
+ dotnet run -h|--help
+ ~~
Expressions are only allowed as the first element of a pipeline.
At line:1 char:17
+ dotnet run -h|--help
+ ~~~~
Unexpected token 'help' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
任何想法为什么会发生这种情况?为什么命令没有按预期显示帮助?到处搜索,我一直无法得出确凿的答案。
使用'dotnet -h'或'dotnet --help'。 – Phylogenesis