void RestorePackages(IEnumerable <DotNetProject> projects)
        {
            var actions = projects.Select(project => new RestoreNuGetPackagesInDotNetCoreProject(project)).ToList();
            var message = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInProjectMessage();

            PackageManagementServices.BackgroundPackageActionRunner.Run(message, actions);
        }
        void RestorePackages(DotNetProject project)
        {
            ProgressMonitorStatusMessage message = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInProjectMessage();
            var action = new RestoreNuGetPackagesInDotNetCoreProject(project);

            action.ReloadProject = true;
            PackageManagementServices.BackgroundPackageActionRunner.Run(message, action);
        }
 public static void Run(DotNetProject project)
 {
     try {
         ProgressMonitorStatusMessage message = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInProjectMessage();
         IPackageAction action = CreateRestorePackagesAction(project);
         PackageManagementServices.BackgroundPackageActionRunner.Run(message, action);
     } catch (Exception ex) {
         ShowStatusBarError(ex);
     }
 }
Example #4
0
 protected override void Run()
 {
     try {
         ProgressMonitorStatusMessage message = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInProjectMessage();
         IPackageAction action = CreateRestorePackagesAction(GetSelectedDotNetProject());
         PackageManagementServices.BackgroundPackageActionRunner.Run(message, action);
     } catch (Exception ex) {
         ShowStatusBarError(ex);
     }
 }
Example #5
0
 public static void Run(DotNetProject project, bool restoreTransitiveProjectReferences, bool reevaluateBeforeRestore = false)
 {
     try {
         ProgressMonitorStatusMessage message = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInProjectMessage();
         IPackageAction action = CreateRestorePackagesAction(project, restoreTransitiveProjectReferences, reevaluateBeforeRestore);
         PackageManagementServices.BackgroundPackageActionRunner.Run(message, action);
     } catch (Exception ex) {
         ShowStatusBarError(ex);
     }
 }
Example #6
0
        protected override void Run()
        {
            IDotNetProject project = GetSelectedProject();

            if (project == null)
            {
                return;
            }

            ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInProjectMessage();
            var runner = new PackageRestoreRunner();

            PackageManagementBackgroundDispatcher.Dispatch(() => {
                runner.Run(project, progressMessage);
            });
        }
        static void ShowStatusBarError(Exception ex)
        {
            ProgressMonitorStatusMessage message = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInProjectMessage();

            PackageManagementServices.BackgroundPackageActionRunner.ShowError(message, ex);
        }