Compartilhar via


Learn about Solution Explorer

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

You can use the Solution Explorer tool window to create & manage your solutions and projects and to view & interact with your code. In this article, we'll detail the user interface (UI) options that help you do so.

Note

This topic applies only to Visual Studio on Windows.

Tool window

To start, let's take a look at the Solution Explorer tool window in the Visual Studio IDE, with an open C# console solution that has two projects.

An annotated screenshot of the Solution Explorer tool window in Visual Studio.

The tool window contains the following UI (user interface) elements:

  • Menu bar, where you can control how your files appear
  • Search bar, where you can search for specific files and file types
  • Main window, where you can view and manage your files, projects, & solutions
  • Solution node, where you can manage your solution(s)
  • Project node, where you can manage your project(s)
  • Dependencies node, where you can manage your solution & project dependencies
  • Program node, where you can view, edit, and manage your program or application (app)
  • Git changes tab, where you can use Git & GitHub within Visual Studio to collaborate on projects with your team

Tip

If you don't see the Solution Explorer tool window, you can open it from the Visual Studio menu bar by using View > Solution Explorer, or by pressing Ctrl+Alt+L.

To continue, let's take a closer look at the Solution Explorer menu bar.

An annotated screenshot of the Solution Explorer menu bar in Visual Studio.

The menu bar contains the following UI elements, from left to right:

  • Back button, to toggle between search results
  • Forward button, to toggle between search results
  • Home button, to return to the default view
  • Switch Views button, to switch between solutions and available views
  • Pending Changes Filter button & drop-down menu, to view open files or files with pending changes
  • Sync with Active Document button, to locate a file from the code editor
  • Refresh button, which appears only when you select a dependency, such as a function or a package
  • Collapse All button, to collapse the file view in the main window
  • Show All Files button, to view all files, including unloaded projects
  • Properties button, to view and change settings for specific files and components
  • Preview Selected Items button, to view a selected file or component in the code editor

Context menu

In Solution Explorer, there are several options that you can interact with by using the right-click context menu. The context-specific options that appear depend on whether you select a Solution node or a Project node.

Solution node context menu options

The following screenshot for a C# console app shows the context menu options that appear when you right-click the Solution node.

Screenshot of the right-click context menu from a solution node in Solution Explorer.

What you see in the context menu from the Solution node also depends on your project type, programming language, or platform. The following screenshot highlights the following extra options for a C# app: Project Dependencies, Project Build Order, Set Startup Projects, and a Git fly-out menu. These extra options typically appear when you add another project to a solution and then add it to a repo.

Screenshot of the right-click context menu from a solution node in Solution Explorer, which shows extra options.

Project node context menu options

The following screenshot for a C# console app shows the context menu options that appear when you right-click the Project node.

Screenshot of the right-click context menu from a project node in Solution Explorer.

What you see in the context menu from the Project node also depends on your project type, programming language, or platform. The following screenshot highlights the following extra option for a C# app: a Build Dependencies fly-out menu. Extra options typically appear when you add another project to a solution and then add it to a repo.

Screenshot of the right-click context menu from a project node in Solution Explorer, which shows an extra option.

The Add context menu fly-out

In the Solution Explorer context menu, one of the most useful options is the Add fly-out menu. From it, you can add another project to a solution. You can also add an item to a project, and more.

Screenshot of the Add fly-out menu from the right-click context menu in Solution Explorer.

You can view the Add fly-out menu from either the Solution node, the Project node, or the Dependencies node. The options vary, depending on which node you use.

For a tutorial that walks you through how to add items and projects by using the context menu in Solution Explorer, see the Introduction to projects and solutions page.

See also