[go: up one dir, main page]

DEV Community

Cover image for Visual Studio tip: Scope to
Karen Payne
Karen Payne

Posted on

Visual Studio tip: Scope to

Introduction

Learn how to work with a subset of projects in a Microsoft Visual Studio solution.

Scenario

A developer is given a task where to write unit test for the first project which has several projects as shown below that are not needed.

Full solution in solution explorer

For the task, in this case, only the first two projects are needed. This is what would make things easier.

Two solution explorers with one project in each

How to achieve what is shown above

  1. In Solution Explorer, right click and select New Solution Explorer View. This will open a duplicate of the current Solution Explorer undocked.
  2. In the original Solution Explorer (in this case), select the first project.
  3. right click and select Scope to this which places a filter so that now only this project is shown
  4. In the second Solution Explorer, select (in this case) the second project followed by Scope to this.
  5. Now drag the undocked Solution Explorer under the docked Solution explorer and tag/touch the dock item as per below.

docking two solution explorers

Getting back to where we started

  1. Close the second/bottom using the close button
  2. To remove the filter on the first, click the house icon.

Single solution explorer

What about extending this to more views?

Yes this is possible yet rather than doc as per above consider floating the Solution Explorer windows in a secondary monitor.

Related

Top comments (1)

Collapse
 
copling2 profile image
Terrance Copling

Cool tip.