Skip to content

FileSystemInfo[] Argument type not parsing in preview4 #1821

Open
@brandonh-msft

Description

@brandonh-msft

I was previously using preview1 of this project and had this code

AddArgument(new Argument<FileSystemInfo[]>("files-or-directories", LocalizedStrings.BinaryAnalysisContentHelp)
{
    Arity = ArgumentArity.OneOrMore,
}.ExistingOnly());

which worked as desired, however now it is throwing me an exception:

Unhandled exception: System.ArgumentException: Type System.Collections.Generic.IReadOnlyCollection`1[System.IO.FileSystemInfo] cannot be created without a custom binder.
   at System.CommandLine.Binding.ArgumentConverter.CreateEnumerable(Type type, Type itemType, Int32 capacity)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions