/// <summary>
        ///   Selects projects in Solution explorer window.
        /// </summary>
        /// <param name="projectInfos">
        ///   Array of <c>ProjectInfo</c> objects to select.
        /// </param>
        private void FindAndSelectSetupProjects(ProjectInfo[] projectInfos)
        {
            m_selectedSetupProjects = new ArrayList();
            SolutionExplorerSelector ses = new SolutionExplorerSelector(m_devEnvApplication);

            foreach (ProjectInfo pi in projectInfos)
            {
                if (pi.ProjectTypeInfo.ProjectType == ProjectType.SetupProject)
                {
                    ses.SelectItem(pi, null);
                    m_selectedSetupProjects.Add(pi);
                }
            }
        }
 /// <summary>
 ///   Reloads projects previously unloaded.
 /// </summary>
 public void ReloadSetupProjects()
 {
     if (m_selectedSetupProjects.Count > 0)
     {
         SolutionExplorerSelector ses = new SolutionExplorerSelector(m_devEnvApplication);
         foreach (ProjectInfo setupProject in m_selectedSetupProjects)
         {
             ses.SelectItem(setupProject, null);
         }
         m_devEnvApplication.MainWindow.Activate();
         // Solution Explorer window must be active to allow reloading project
         Window solutionExplorer = m_devEnvApplication.Windows.Item(EnvDTE.Constants.vsWindowKindSolutionExplorer);
         solutionExplorer.Activate();
         m_devEnvApplication.ExecuteCommand("Project.ReloadProject", "");
     }
 }
        /// <summary>
        ///   Selects items to check out in Solution Browser window.
        /// </summary>
        private void SelectItemsInSolutionExplorer(ProjectInfo[] projectsToCheckOut)
        {
            Debug.Assert(m_environment != null);
            Debug.Assert(projectsToCheckOut != null);
            SolutionExplorerSelector ses = new SolutionExplorerSelector(m_environment);

            foreach (ProjectInfo pi in projectsToCheckOut)
            {
                if (pi.ProjectTypeInfo.ProjectType == ProjectType.SetupProject)
                {
                    ses.SelectItem(pi, null);
                }
                else
                {
                    ses.SelectItem(pi, pi.VersionFilenames);
                }
            }
            m_environment.MainWindow.Activate();
        }