public static Project GetSelectedProject(this DTE dte) { Project result = null; try { IVsProject vsProj = Global.GetSelectedVsProject(); if (vsProj != null) { result = dte.GetProjectByFile(vsProj.FileName()); } } catch { } return(result); }
public static Project GetSelectedProject(this DTE dte) { Project project = (Project)null; try { IVsProject selectedVsProject = Global.GetSelectedVsProject(); if (selectedVsProject != null) { project = dte.GetProjectByFile(selectedVsProject.FileName()); } } catch { } return(project); }