internal static void UpdatePackage(IDotNetProject project, string packageId, bool includePrerelease)
        {
            try {
                var solutionManager = PackageManagementServices.Workspace.GetSolutionManager(project.ParentSolution);
                var action          = new UpdateNuGetPackageAction(solutionManager, project)
                {
                    PackageId         = packageId,
                    IncludePrerelease = includePrerelease
                };

                ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateUpdatingSinglePackageMessage(packageId, project);
                UpdatePackage(progressMessage, action);
            } catch (Exception ex) {
                ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateUpdatingSinglePackageMessage(packageId);
                PackageManagementServices.BackgroundPackageActionRunner.ShowError(progressMessage, ex);
            }
        }
        public void UpdatePackage()
        {
            var packageReferenceNode = (PackageReferenceNode)CurrentNode.DataItem;

            try {
                var solutionManager = PackageManagementServices.Workspace.GetSolutionManager(packageReferenceNode.Project.ParentSolution);
                var action          = new UpdateNuGetPackageAction(solutionManager, packageReferenceNode.Project)
                {
                    PackageId         = packageReferenceNode.Id,
                    IncludePrerelease = !packageReferenceNode.IsReleaseVersion()
                };

                ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateUpdatingSinglePackageMessage(packageReferenceNode.Id, packageReferenceNode.Project);
                UpdatePackage(progressMessage, action);
            } catch (Exception ex) {
                ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateUpdatingSinglePackageMessage(packageReferenceNode.Id);
                PackageManagementServices.BackgroundPackageActionRunner.ShowError(progressMessage, ex);
            }
        }
        Task UpdateNuGetPackage(DotNetProject project, string packageId)
        {
            var solutionManager = new MonoDevelopSolutionManager(project.ParentSolution);
            var context         = CreateNuGetProjectContext(solutionManager.Settings);
            var packageManager  = new MonoDevelopNuGetPackageManager(solutionManager);

            var action = new UpdateNuGetPackageAction(
                solutionManager,
                new DotNetProjectProxy(project),
                context,
                packageManager,
                PackageManagementServices.PackageManagementEvents)
            {
                PackageId = packageId
            };

            return(Task.Run(() => {
                action.Execute();
            }));
        }
		public void UpdatePackage ()
		{
			var packageReferenceNode = (PackageReferenceNode)CurrentNode.DataItem;

			try {
				var solutionManager = PackageManagementServices.Workspace.GetSolutionManager (packageReferenceNode.Project.ParentSolution);
				var action = new UpdateNuGetPackageAction (solutionManager, packageReferenceNode.Project) {
					PackageId = packageReferenceNode.Id,
					IncludePrerelease = !packageReferenceNode.IsReleaseVersion ()
				};

				ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateUpdatingSinglePackageMessage (packageReferenceNode.Id, packageReferenceNode.Project);
				UpdatePackage (progressMessage, action);
			} catch (Exception ex) {
				ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateUpdatingSinglePackageMessage (packageReferenceNode.Id);
				PackageManagementServices.BackgroundPackageActionRunner.ShowError (progressMessage, ex);
			}
		}