question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Longname being ignored

See original GitHub issue

I have an option for a start date. [Option('s', "startdate", Required = false, HelpText

and am using the -startdate 7/1/2020 as the arg

But no matter what I do, the args always end up being parsed as a shortname "nddate 7/1/2020"

I would expect it to be 7/1/2020 and clean up that other stuff.

  • Language: C#
  • Framework: .Net Core 3.1
  • OS: OSX 10.14
  • IDE: Visual Studio Code

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
moh-hassancommented, Jul 9, 2020

I find something interesting in the commandline args in launch.json which interpret the values in the Environment.GetCommandLineArgs()

“args”: [“–folderId 123455”, “–startdate 10/12/19”, “–enddate 7/1/2020”]

That is invalid arguments because every option name and value are merged together, e.g, the argument "--folderId 123455" should be two arguments like: "--folderId" , "123455"

To correct the behaviour of the parser, modify args in launch.json as:

"args": ["--folderId", "123455", "--startdate", "10/12/19", "--enddate", "7/1/2020"]

Can you try and feedback if this resolved your issue?

1reaction
moh-hassancommented, Jul 9, 2020

Thanks for feedback. BTW, If you want to merge options(without space separator), it can be as: ShortNames if Short option is ‘sand value12345’ Argument can be: -s12345

For LongNames use = between option name and value, like:

--folderId=123455

Alternative argument can be:

"args": ["--folderId=123455", "--startdate=10/12/19", "--enddate=7/1/2020"]
Or
"args": ["-f123455", "-s10/12/19", "--enddate=7/1/2020"]

See Commandline grammer

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignore my cousin screaming in the background - TikTok
TikTok video from chloe. longname (@chloe. longname ): " Ignore my cousin ... Being chronically single is so dumb, because there's so many...
Read more >
"/hires/" not working for longname textures (only shortname)
Using "textures/brick_00.png" in my map makes the lowres texture appear ingame, the hires replacement is ignored. What can I do here to make...
Read more >
CCN3681
pragma export(&1) is ignored; both LONGNAME and RENT options must be specified. Explanation. The variable/function is not exported because both LONGNAME and ...
Read more >
EDC4026W
A RENAME card had been encountered that attempted to rename a long name to another long name. System action. The card is ignored...
Read more >
renewcommand being ignored when babel is loaded
How can i prevent this behaviour? I already treid altering the position of the \renewcommand prompts. First without babel loaded: \documentclass ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found