int IVsHierarchyEvents.OnPropertyChanged(uint itemid, int propid, uint flags) { //Reporting projects don't raise the normal ProjectItem Renamed event //this event is raised 4 times when a report file is renamed //VSHPROPID_Caption happens to be the first so in order to limit the //item rename code from firing multiple times I'm limiting it to this property if (propid != (int)__VSHPROPID.VSHPROPID_Caption) { return(VSConstants.S_OK); } object objProj; _hierarchy.GetProperty(itemid, (int)__VSHPROPID.VSHPROPID_ExtObject, out objProj); var projectItem = objProj as ProjectItem; if (projectItem != null) { _reportList.ProjectItemRenamed(projectItem); } return(VSConstants.S_OK); }