static void Main(string[] args) { var options = new Options(); if (!Parser.Default.ParseArguments(args, options)) { Environment.Exit(Parser.DefaultExitCodeFail); } using (var vs = VisualStudio.Create(logTo: Console.Out)) { vs.OpenSolution(options.SlnPath); if (string.IsNullOrEmpty(options.ProjectName)) { var exportedTemplates = vs.ExportTemplate(options.IncludeNuGetPackages).ToList(); if (exportedTemplates.Any()) { vs.CombineTemplates(Path.GetFileNameWithoutExtension(options.SlnPath), exportedTemplates); } else { Console.WriteLine("No Projects to export!"); } } else { vs.ExportTemplate(options.ProjectName, options.IncludeNuGetPackages); } if (!string.IsNullOrEmpty(options.VsixProjectName)) { vs.CreateVsix(options.ProjectName, options.VsixProjectName); } } Console.WriteLine("Everything is OK!"); }
static void Main(string[] args) { var options = new Options(); if (!Parser.Default.ParseArguments(args, options)) { Environment.Exit(Parser.DefaultExitCodeFail); } using (var vs = VisualStudio.Create(logTo: Console.Out)) { vs.OpenSolution(options.SlnPath); vs.ExportTemplate(options.ProjectName, options.IncludeNuGetPackages); if (!string.IsNullOrEmpty(options.VsixProjectName)) { vs.CreateVsix(options.ProjectName, options.VsixProjectName); } } Console.WriteLine("Everything is OK!"); }