Bagikan melalui


How to: Move Items

The procedure for moving items in Solution Explorer is straightforward. However, the outcome for moving items varies by project type. Some projects, such as Web applications, require an actual file to exist in the project directory for each item shown in Solution Explorer. Others require the item in Solution Explorer to act only as a link. Some projects allow both. Solution Explorer provides the appropriate item for the target project.

To move items in Solution Explorer

  1. In Solution Explorer, select the item you want to move.

  2. On the Edit menu, choose Cut.

  3. In Solution Explorer, select the destination.

  4. On the Edit menu, choose Paste.

Also, you can drag items to move them. Dragging allows you to see the possible differences between the various projects as the mouse pointer indicates the outcome of the drag operation. You can drag most files within Solution Explorer, create links to files by dragging them onto documents open in a default editor, or you can drag files from Windows Explorer into Solution Explorer.

To change the outcome of many drag operations, you can press modifier keys: Ctrl, Shift and Ctrl+Shift. You can determine the outcome of a modified drag-and-drop operation by selecting an item, dragging it to the target location, and observing which of the following mouse pointers appears before the item is dropped.

Mouse Pointer

Outcome of the Drag Operation

SEnoMoveToolTip screenshot

Unable to move the item to that location.

SEcopyToolTip screenshot

Moves a copy of the file to the default location for the specified project, solution or document.

SEmoveToolTip screenshot

Moves the file to the specified project, solution or document.

SEreferenceToolTip screenshot

Adds a link to the item (or the physical file to which it refers in storage) the specified project, solution or document. See How to: Add Existing Items to a Project for more details.

If you need more information about the differences in outcomes when moving an item, see Item Management in Projects.

See Also

Concepts

Using Solution Explorer

Item Management in Projects

Reference

Solution Explorer