public override int OnAfterRenameFiles(int cProjects, int cFiles, IVsProject[] projects, int[] firstIndices, string[] oldFileNames, string[] newFileNames, VSRENAMEFILEFLAGS[] flags)
        {
            if (!_project.IsRefreshing)
            {
                //Get the current value of the StartupFile Property
                string currentStartupFile    = _project.GetProjectProperty(CommonConstants.StartupFile, true);
                string fullPathToStartupFile = Path.Combine(_project.ProjectDir, currentStartupFile);

                //Investigate all of the oldFileNames if they are equal to the current StartupFile
                int index = 0;
                foreach (string oldfile in oldFileNames)
                {
                    //Compare the files and update the StartupFile Property if the currentStartupFile is an old file
                    if (NativeMethods.IsSamePath(oldfile, fullPathToStartupFile))
                    {
                        //Get the newfilename and update the StartupFile property
                        string         newfilename = newFileNames[index];
                        CommonFileNode node        = _project.FindChild(newfilename) as CommonFileNode;
                        if (node == null)
                        {
                            throw new InvalidOperationException("Could not find the CommonFileNode object");
                        }
                        //Startup file has been renamed
                        _project.SetProjectProperty(CommonConstants.StartupFile, node.Url);
                        break;
                    }
                    index++;
                }
            }
            return(VSConstants.S_OK);
        }