Exemple #1
0
        private Project ResolveProject(IContext context, string projectName)
        {
            Project project     = null;
            var     nodeFactory = new SolutionProjectsNodeFactory(_references.DTE as DTE2);

            project = nodeFactory.ResolveProjectFromName(projectName);
            if (null != project)
            {
                return(project);
            }

            ProjectNodeFactory projectNodeFactory =
                context.ResolvePath(projectName) as ProjectNodeFactory;

            if (null != projectNodeFactory)
            {
                project = projectNodeFactory.Project;
            }

            return(project);
        }
        private Project ResolveProject(IContext context, string projectName)
        {
            Project project = null;
            var nodeFactory = new SolutionProjectsNodeFactory(_references.DTE as DTE2);
            project = nodeFactory.ResolveProjectFromName(projectName);
            if (null != project)
            {
                return project;
            }

            ProjectNodeFactory projectNodeFactory =
                context.ResolvePath(projectName) as ProjectNodeFactory;
            if (null != projectNodeFactory)
            {
                project = projectNodeFactory.Project;
            }

            return project;
        }