static void Main(string[] args) { var config = new Config(); var p = new OptionSet() { { "s|source=", "the source {dir} of the templated project.", v => config.SourceDirectory = v }, { "d|destination=", "the destination {dir} of the outputted NuGet directories", v => config.DestinationDirectory = v }, { "c|config=", "the config {dir} which contains your nuspec files.", v => config.ConfigDirectory = v }, { "h|help", "show this message and exit", v => config.ShowHelp =( v != null )}, { "x|execute=", "execute {NuGet.exe} when creation is complete", v => config.ExecutePath = v } }; List<string> extra; try { extra = p.Parse(args); DisplayBanner(); Console.ForegroundColor = ConsoleColor.Red; if (config.IsValid() == false) { config.ShowHelp = true; } Console.ResetColor(); if (config.ShowHelp) { p.WriteOptionDescriptions(Console.Out); return; } var factory = new PackageFactory(); factory.Build(config); } catch (OptionException e) { Console.Write("OnRamper: "); p.WriteOptionDescriptions(Console.Out); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(e.Message); Console.ResetColor(); return; } }