Export (0) Print
Expand All

Renaming Solutions, Projects, and Items

You can rename solutions, most projects, and most items that are displayed in Solution Explorer.

Note   A careful distinction should be drawn between items and files. Items include references, data connections and folders, none of which are files.

Use the following procedure for renaming solutions and projects.

To rename an item

  1. In Solution Explorer, select the item you want to rename.
  2. On the View menu, choose Properties Window.
  3. In the Properties window, locate the Name property and type a new item name.
    Note   For some items, you might need to change the Filename property.

If the item you want to rename is a link to the file and not the file itself, you need to save the target file to the new name in order to rename the link.

To rename a link item

  1. In Solution Explorer, select the item and then choose Save As on the File menu.
  2. In the Save File As dialog box, select a location for the file.
  3. In File name textbox, type a new name.
  4. From the Save as type drop-down box, select a file type and then choose Save.
    Note   The Save As options makes a copy of the item. The copy is not automatically added to your project. Instead, it appears in the Solution Items folder.
  5. In Solution Explorer, select the project and then select Add Existing Item on the Project menu.
  6. In the Add Existing Item dialog box, select the item you saved and then choose Open.
  7. In Solution Explorer, select the original link and then choose remove on the Context menu.

Any changes you make to the file with the new name are not saved to the file that the original link referenced.

See Also

Using Solution Explorer | Item Management in Projects

© 2014 Microsoft