When you have a config like:
appConf
.AddBranch<MyBranchCliOptions>("mybranch", conf =>
{
conf.AddCommand<MyCommandCliOptions>("mycommand")
.WithDescription("a command description")
});
then you run dotnet run -- mybranch mycommand --help it only displays the help from MyCommandCliOptions excluding the inherited properties from MyBranchCliOptions.
public class MyBranchCliOptions: CommandSettings
{
//properties here will not be shown in help
}
public class MyCommandCliOptions: MyBranchCliOptions
{
//properties here will be shown in help
}
If you change
conf.AddCommand<MyCommandCliOptions>("mycommand")
to
conf.AddCommand("mycommand")
it works as expected but now my command settings for .AddCommand<> aren't enforced to inherit from the branch settings.
Additionally, when you ask --help at the branch level it shows properly. Probably an issue with reflection params when trying to get the attributes from the properties?
When you have a config like:
then you run
dotnet run -- mybranch mycommand --helpit only displays the help fromMyCommandCliOptionsexcluding the inherited properties fromMyBranchCliOptions.If you change
to
it works as expected but now my command settings for
.AddCommand<>aren't enforced to inherit from the branch settings.Additionally, when you ask
--helpat the branch level it shows properly. Probably an issue with reflection params when trying to get the attributes from the properties?