示例#1
0
 void TryGetActiveProject()
 {
     try {
         project = solution.GetActiveProject();
     } catch (Exception ex) {
         errorMessage = ex.Message;
     }
 }
示例#2
0
        public void Run(PackageReferenceNode packageReferenceNode, ProgressMonitorStatusMessage progressMessage)
        {
            try {
                IPackageManagementProject project = solution.GetActiveProject();
                ReinstallPackageAction    action  = project.CreateReinstallPackageAction();
                action.PackageId      = packageReferenceNode.Id;
                action.PackageVersion = packageReferenceNode.Version;

                runner.Run(progressMessage, action);
            } catch (Exception ex) {
                runner.ShowError(progressMessage, ex);
            }
        }