Skip to content

How does dashdash work in 2.x? #422

Closed
@RedX2501

Description

@RedX2501

i want to have a command line as:

exe -g -- filename1 filename2

So I tried

 exe -g -- filename1
class Opts a
  [Option('g')]
  bool Generate {get; set;}
  [Value(0)]
  string Filename {get; set;}
}

var p = new Parser(settings => settings.EnableDashDash = true);
p.ParseArguments<Opts>(args);

I get the error:

ERROR(S):
Error setting value to option 'unknownarguments': Property set method not
found.

So what's the correct way of doing this in 2.x?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions