Hello,
I'm using topshelf and I'm getting this exception when I try to use the "-i" option to install as a service...please help me..
Unable to cast object of type 'Magnum.CommandLineParser.SwitchElement' to type 'Magnum.CommandLineParser.IArgumentElement'.
Exception occurs in this function
static void Set(TopshelfArguments args, IEnumerable<ICommandLineElement> commandLineElements)
{
var command = commandLineElements
.Take(1)
.Select(x => (IArgumentElement) x) //EXCEPTION BREAKS ON THIS LINE
.Select(x => x.Id)
.DefaultIfEmpty("commandline")
.SingleOrDefault();
args.Command = command;
//leftovers
args.CommandArgs = commandLineElements.Skip(1).ToList();
}
Thanks