This procedure describes how to rename files and update all instances where that file is referenced within the project.
To rename a file using the Refactoring feature:
- In Project Explorer view, right-click the file which you would like to rename and select Refactor | Rename -or- select it and go to Refactor | Rename from the Menu Bar.
A Rename File dialog will appear.
- Enter the file's new name.
- Check the "Update references" box and click Preview.
A preview window will open with a change tree showing all the changes which will be made to reflect the rename of the file, sorted according to the files in which the changes will be made.
Note that, if the file has been referenced (required, included etc.) in other files, the name of the file will also be updated in those instances. - You can scroll through the different changes using the Select Next / Previous Change scrolling arrows .
- If you are satisfied with the changes, press OK.
The file will be renamed and all instances where that file is referenced will be updated to reflect the change.