Adding and Removing Files

See Also

A project can contain multiple files which can be opened, closed, and saved together. The types of files that can be contained within a project vary according to the language engine.

Note   Solutions can also contain files which are not related to a specific project. These are listed under the Miscellaneous Files node in the Project Explorer. If you attempt to add a file to a project that isn’t appropriate for the project type, it will be added to the Miscellaneous Files node. You can also explicitly add a file to the Miscellaneous Files node using the New File or Open File commands, available from the File menu.

To add a file to a project

  1. Select the Project’s node in the Project Explorer.

  2. Choose Add Item from the Project menu.

  3. Select an existing file or a new file template from the Add Item dialog box.

    The selected item will be added to the selected project in the Project Explorer.

To remove a file from a project

  1. Select the file in the Project Explorer.

  2. Choose Remove From Project from the Project menu.

    The file will be removed from the project; it will not be deleted however, and can still be used in other projects.