Share via


How to: Rename a Source-controlled Item

When you rename a source-controlled item, Visual Studio renames the local copy automatically if the source control plug-in supports namespace change propagation. Otherwise, it queries you for rename instructions. For more about namespace change propagation, see Introducing Source Control.

To rename a source-controlled item

  1. In Visual Studio, open Solution Explorer.

  2. Right-click the file to rename, and then click Rename.

  3. Type a new name and press Enter.

  4. If you are prompted to check out the item. Check it out as supported by the source control plug-in.

  5. In the Source Control dialog box, click Rename or move the item(s) locally and in the source control store, and then click OK.

  6. In Solution Explorer, check in the item as supported by the source control plug-in.

  7. Notify anyone who might have checked out the item that you have renamed it.

  8. If namespace change propagation is supported, have the other users perform a get operation to update their local copies. They receive a message notifying them of the rename operation.

  9. If namespace change propagation is not supported, you must tell the other users to manually rename their local copies to reflect the name change.

See Also

Tasks

How to: Bind or Unbind a Solution or Project

Concepts

Introducing Source Control

Reference

Source Control Dialog Box

Other Resources

Performing Source Control Tasks