Como: Renomear soluções, projetos e itens

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

ObservaçãoObservação

A 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 a solution

  1. In Solution Explorer, right-click the solution node and then select Rename from the context menu.

  2. Type the new name for your solution.

To rename a project

  1. In Solution Explorer, right-click the project node and then select Rename from the context menu.

  2. Type the new name for your solution.

    ObservaçãoObservação

    Renaming a project does not automatically rename the folder that contains the project.

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.

    ObservaçãoObservação

    For some items, you might need to change the File Name property.

    ObservaçãoObservação

    When you rename an item, the corresponding class name in that item is renamed automatically. For example, if you rename Form1.vb, the class Form1 is renamed automatically.

    ObservaçãoObservação

    The Name property is not available for items that are dependent upon other items.

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.

  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.

    ObservaçãoObservação

    The Save As options makes a copy of the item. The copy is automatically added to your project.

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

Consulte também

Conceitos

Usando o Solution Explorer

Gerenciamento de itens em projetos