private void RemoveNUnitPackages(DTEProject selectedProject, StatusbarContext statusbar, ref int complete, int total)
        {
            if (m_options.UninstallNUnitPackages && m_options.NUnitPackages?.Length > 0)
            {
                OutputMessage("Removing NUnit packages", statusbar, ++complete, total);
                using (var packageInstaller = PackageHandler.CreateHosted(selectedProject, m_outputWindowPane))
                {
                    packageInstaller.ReportWarning = msg =>
                    {
                        var diag = Diagnostic.Create(DiagnosticsDescriptors.CannotRemovePackage, Location.None, msg);
                        m_errorListProvider.AddTask(diag, selectedProject);
                    };

                    foreach (var package in m_options.NUnitPackages)
                    {
                        packageInstaller.RemovePackage(package.Trim());
                    }
                }
            }
        }
 private void AddMSTestPackages(DTEProject selectedProject, StatusbarContext statusbar, ref int complete, int total)
 {
     if (m_options.InstallMSTestPackages && m_options.MSTestPackages?.Length > 0)
     {
         OutputMessage("Adding MSTest packages", statusbar, ++complete, total);
         using (var packageInstaller = PackageHandler.CreateHosted(selectedProject, m_outputWindowPane))
         {
             foreach (var package in m_options.MSTestPackages)
             {
                 var spec = package.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToList();
                 if (spec.Count > 1)
                 {
                     packageInstaller.AddPackage(spec[0], spec[1]);
                 }
                 else
                 {
                     packageInstaller.AddPackage(spec[0]);
                 }
             }
         }
     }
 }