Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

类型 {0} 中没有发现任何可以作为命令行参数的可见属性。 #3

Open
walterlv opened this issue Aug 4, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@walterlv
Copy link
Member

walterlv commented Aug 4, 2019

当一个 Options 类里没有任何属性标记了 Option 或者 Value 的情况下,会抛出异常,期待不要抛出此异常,而是更能指导如何编写代码的异常。

类型 MainTask 中没有发现任何可以作为命令行参数的可见属性。

   at dotnetCampus.Cli.Parsers.RuntimeCommandLineOptionParser`1.Create() in C:\Users\lvyi\.nuget\packages\dotnetcampus.commandline.source\1.0.0\src\Parsers\RuntimeCommandLineOptionParser.cs:line 44
   at dotnetCampus.Cli.Utils.CommandLineHelpers.FindParser[T]() in C:\Users\lvyi\.nuget\packages\dotnetcampus.commandline.source\1.0.0\src\Utils\CommandLineHelpers.cs:line 35
   at dotnetCampus.Cli.Utils.CommandLineHelpers.MatchAndHandle[TVerb](CommandLine commandLine, String possibleVerb, Func`2 handler, ICommandLineOptionParser`1 parser) in C:\Users\lvyi\.nuget\packages\dotnetcampus.commandline.source\1.0.0\src\Utils\CommandLineHelpers.cs:line 128
   at dotnetCampus.Cli.CommandLineHandlerBuilder.<>c__DisplayClass3_0`1.<AddHandler>b__0(String verb) in C:\Users\lvyi\.nuget\packages\dotnetcampus.commandline.source\1.0.0\src\CommandLineHandlerBuilder.cs:line 43
   at dotnetCampus.Cli.StateMachine.HandleVerbStateMachine`1.<Run>d__3.MoveNext() in C:\Users\lvyi\.nuget\packages\dotnetcampus.commandline.source\1.0.0\src\StateMachine\HandleVerbStateMachine.cs:line 63
   at dotnetCampus.Cli.CommandLineAsyncHandlerBuilder.RunAsync() in C:\Users\lvyi\.nuget\packages\dotnetcampus.commandline.source\1.0.0\src\CommandLineHandlerBuilder.cs:line 221
@walterlv walterlv added the enhancement New feature or request label Aug 4, 2019
@walterlv walterlv added this to the 2.0.0-preview milestone Aug 4, 2019
@walterlv walterlv self-assigned this Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant