Share via


Solution Explorer

Solution Explorer provides you with an organized view of your projects and their files as well as ready access to the commands that pertain to them. A toolbar associated with this window offers commonly used commands for the item you highlight in the list. To access Solution Explorer, select Solution Explorer on the View menu.

  • Tree View
    This standard Solution Explorer view presents the active solution as a logical container for one or more projects and the items associated with them. You can open project items for modification and perform other management tasks directly from this view. Because different kinds of projects store items in different ways, the folder structure in Solution Explorer does not necessarily reflect the actual physical storage of the items listed. For more information, see Item Management in Projects.

    When the "Track Active Item in Solution Explorer" option is selected in the Projects and Solutions, Environment, Options Dialog Box, Solution Explorer automatically opens the folder for the active item, scrolls to its tree view node, and selects its name. The selected item changes as you work with different files within a project or solution, or different components within an Integrated Development Environment (IDE) designer. When this option is cleared, the selection in Solution Explorer does not change automatically.

    To associate a file with a solution but not with a specific project, add the file directly to the solution. A new node for the added file will then appear within the Solution Items folder. Other files not yet associated either with the active solution or with any of its projects are placed in the Miscellaneous Files folder. These are generally files opened or created on your local drive while working with a project.

    **Note   **To display all miscellaneous files in tree view, select the option "Show miscellaneous files in Solution Explorer" in the Documents, Environment, Options Dialog Box. Selecting this option also enables the View in Browser command on the File menu to display external Web documents not included in a Web application.

  • Project in Bold Font
    A project shown in bold font is selected as the Startup Project for running and debugging purposes. If there is more than one startup project, then the solution node in the tree view is shown in bold font. Startup projects run automatically when you start the Visual Studio debugger. By default, the first project created in the solution is designated as the startup project, but you can easily change which projects run first when you Build or Run your solution For more information, see Setting Startup Projects, Startup Project, Common Properties, Solution Property Pages Dialog Box, and Debug Settings and Preparation.

    When the "Only build startup projects and dependencies on Run" option is selected in the Projects and Solutions, Environment, Options Dialog Box, only the startup project and its dependencies are built when you

    press F5 or choose the Start command from the Debug menu

    -or-

    press Control+Shift+b or choose the Build Solution command from the Run menu.

    When this option is cleared, either of these actions builds all projects, dependencies, and solution files.

  • Solution in Bold Font
    A solution shown in bold font indicates that the option to run multiple projects when the debugger starts is enabled. Although the option is enabled, it does not mean that any projects have been selected to run; by default, they are set not to run.

    For more information about running multiple projects when you start the debugger, see the topic Startup Project, Common Properties, Solution Property Pages Dialog Box.

  • Commands
    You can open files, add and remove items, and perform other management tasks. Each project template provides its own folders and icons for indicating the nature of the items in the project. You can add folders and items to meet the needs of your individual development project. The icons can indicate a variety of information about an item. For example, depending on the project, you might see an icon indicating that an item is an HTML file or that a file is under source control. Each project template also determines which tools and designers are associated with a file type as well as the commands available for item management.

  • Selection
    Selecting a solution, project, or item in the list dynamically updates the commands that are available to you. For example, the Copy Web command is available only from Solution Explorer's toolbar if a Web application is selected in the list. You can double-click a file to display it in the designer, tool, or editor associated with the file's type. You can change the default editor for some file types by right-clicking the file and then choosing Open With on the shortcut menu.

  • Multiple-selection
    You can select multiple items in a single project or multiple items spanning several projects. Select multiple items when you want to perform batch operations (simultaneously opening multiple files for editing, for example) or when you want to determine or edit the intersecting properties of two or more solution items. When you select multiple items, the available commands represent the intersection of commands common to all selected items.

For more information about specific projects, select one of the following links.

Toolbar Icons

Only buttons specific to the item selected in the list appear on the Solution Explorer toolbar. For example, if you select an .asax file, a set of buttons appears on the toolbar. However, if you select an .asp file, only the Properties button appears. Because the selected project determines the toolbar icons, this list is a partial representation of those you might encounter while working in Solution Explorer.

  • Show All Files

    Shows all project items, including those that have been excluded and those that are normally hidden. The project initially determines which project items are hidden.

  • Copy Project

    Opens the Copy Web Project dialog box for copying an entire Web project or collection of Web projects between Web servers. You can also duplicate a Web project on the same server under a new name. This command is available only when a Web project is selected.

  • Open

    Opens the selected item in the default editor for that item as determined by the project template. You can change the default editor for a given file type in the Open With dialog box; right-click on the file in Solution Explorer and choose Open With on the shortcut menu. For example, you could change to the text editor from the resource editor for resource files.

  • View Code

    Opens the selected file for editing in the Code Editor.

  • Refresh

    Refreshes the state of the items in the selected project or solution.

    Tip   If you are a member of a development team working with shared project files that are merged and kept under source control, select this button to display the current state of the files included in your active solution.

  • Properties

    Displays property user interface as appropriate for the selected item in the tree view.

Signal Icons

Signal icons indicate information about the status of your files.

  • Item Not Found

    Item has been moved, renamed, or deleted on the project directory and cannot be found.

  • Checked In

    Item is checked into a source control database.

  • Checked Out Exclusive

    Item is checked out from a source control database to one developer only. Other developers cannot access this file.

  • Checked Out Shared

    Item is checked out from a source control database for shared use by a development team. Different versions of the item will be merged upon checkin.

See Also

Using Solution Explorer | Introduction to Solutions, Projects, and Items | Managing Solutions, Projects, and Files | Managing Checkouts | Window Management