Boolean Option Not Being Set

Feb 20, 2013 at 1:16 PM
I have following property on my command line options class:
[Option("a", "almond", DefaultValue = true, HelpText = "Indicates whether or not to use almond instead of require.js.")]
    public bool Almond { get; set; }
I cannot seem to get the value to be set to false. I have tried:

--almond false
--almond "false"

How do I make this work?
Feb 21, 2013 at 12:51 PM
Hi @EisenbergEffect,
thank you for interest in this project.

Boolean options are set if present:
app --almond --otheropt 10
or not set if missing:
app --otheropt 10
I see from your example (short option is still string) that you're using an old version. Please switch to a more recent version.

Download binaries here from CodePlex, get sources from GitHub or use NuGet (Install-Package CommandLineParser -Pre).

Have nice day!