Cache that stores project based on multiple names. i.e. Project can be retrieved by name (if non conflicting), unique name and custom unique name.
 private void OnBeforeClosing()
 {
     DefaultProjectName = null;
     _projectCache      = null;
     if (SolutionClosing != null)
     {
         SolutionClosing(this, EventArgs.Empty);
     }
 }
        private void EnsureProjectCache()
        {
            if (IsSolutionOpen && _projectCache == null)
            {
                _projectCache = new ProjectCache();

                var allProjects = _dte.Solution.GetAllProjects();
                foreach (Project project in allProjects)
                {
                    AddProjectToCache(project);
                }
            }
        }
 private void OnBeforeClosing()
 {
     DefaultProjectName = null;
     _projectCache = null;
     if (SolutionClosing != null)
     {
         SolutionClosing(this, EventArgs.Empty);
     }
 }
        private void EnsureProjectCache()
        {
            if (IsSolutionOpen && _projectCache == null)
            {
                _projectCache = new ProjectCache();

                var allProjects = _dte.Solution.GetAllProjects();
                foreach (Project project in allProjects)
                {
                    AddProjectToCache(project);
                }
            }
        }