In VS2005, Vs2008 and VS2010, I could use the following line of code
Note: hierarchy is an object of IVsHierarchy and is the hierarchy of the project file
IVsProject currentProject = hierarchy as IVsProject;
if (currentProject == null)
return;
//Other code
and it used go to the "Other code". That means IVsHierarchy of a project file will be a IVsProject.
But this seems to be not working in VS2012. Please help!