Skip to content

Unhandled Exception: System.ArgumentException: Incorrect token type #590

Closed

Description

@bugproof

I wanted to use System.CommandLine dragon fruit model in my tool but I'm getting this exception.

async Task Main(string outputFilename = "third-party-notices.txt", string argument = null)

I want to pass just an argument, skipping outputFilename. Like:

dotnet MyApp "Some Argument"

Activity

  1. jonsequitur commented on Aug 21, 2019

    @jonsequitur
    Contributor

    I was unable to reproduce this error.

    One thing to note is that you don't need to call dotnet. Once you've run dotnet publish you can invoke your app like this:

    > MyApp "Some Argument"

    If that doesn't solve it, more detailed repro steps and a stack trace would be helpful.

    Thanks.

  2. bugproof commented on Aug 21, 2019

    @bugproof
    Author

    @jonsequitur it looks like it works in the latest releases, could be a bug in a previous release

  3. jonsequitur commented on Aug 21, 2019

    @jonsequitur
    Contributor

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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