Rename or delete a file under source control
You can use Microsoft Expression Blend to rename or delete files that are under source control.
Other team members will not see files that you rename or delete until you check in your changes. Because each of the following procedures adds a line to the project file (.csproj, .vbproj), you might have to merge your changes if another team member modifies the project file while you have it checked out. For more information, see Merge and resolve conflicts when checking files in.
For information about using Microsoft Visual Studio Team System 2008 Team Explorer to rename or delete files, see How to: Move, Rename, and Delete Version-Controlled Files and Folders on MSDN.
In the Projects panel, right-click the file, and then click Rename.
The name of the file becomes editable.
Type a new name, and then press ENTER.
The file is renamed. In the Projects panel, a rename icon is displayed next to the file to show that it has been renamed but not yet checked in. The project file is updated to reference the new file name. A check mark is displayed next to the project file to show that it is checked out to you.
Check in the renamed file and the modified project file. For more information, see Check files in and out.
Do not modify the contents of a renamed file before checking in the file name change. If you do, the changes will not be checked in when you check in the name change because Microsoft Team Foundation source control regards renaming as an action that is distinct from modification.
In the Projects panel, right-click the file, and then click one of the following:
Delete This will disassociate the file from the project and delete the file from the project folder.
Remove from Project This will disassociate the file from the project but will not delete the file from the folder. You can add the file to the project again by right-clicking the project and then clicking Add Existing Item.
The project file is updated to remove the reference to the removed file. A check mark is displayed next to the project file in the Projects panel to show that it is checked out to you.
Deleted and removed files are no longer displayed in the Projects panel, but you can view the list of deleted files at any time by following the steps in Undo or view the list of pending changes.
Check in the changes you have made by right-clicking the project from which you deleted the files, and then clicking Check In. In the Check In dialog box, make sure that both the deleted file and the project file are selected before clicking Check In.