Work with solution filters
When working with large solutions, there may be two general cases where you want to ignore specific projects of a solution and share this state within a team:
If some team members only work in specific projects of a large solution, they may benefit from the improved solution load time and overall performance if other projects are filtered out and not loaded. In this case, these team members can use a shared solution filter that only includes the necessary projects.
If a large solution consists of a common platform-like codebase and several mostly independent parts built on top of it. In this case, you can create several shared solution filters, each of which includes projects that implement one specific part and the shared platform code, and exclude everything else.
If you want to reduce the number of loaded projects without sharing this state, you can just unload specific projects.
Create solution filter
In the Solution Explorer, select projects that should be excluded from the filter, right-click the selection and choose Unload Projects. This step is optional, you can create a solution filter that includes all projects and edit it later.
Right-click the solution and choose Save as Solution Filter, and then specify the name and location of the filter.
Solution filters are saved as .slnf files. It is recommended to save solution filters in the solution directory and put them under VCS.
Open solution filter
Solution filters are opened the same way as normal .sln solution files.
When a solution filter is open, you can recognize it by the small filter on the solution icon. The total number of projects in the source solution, as well as the number of filtered and unloaded projects is displayed next to the solution node:
Note that the name of the filter is only displayed on the toolbar, but the Solution Explorer displays it with the name of the source solution.
If necessary, you can add and remove projects to and from the solution filter. All changes to the filter will be saved immediately.
Remove projects from solution filter
Select one or more projects to remove from the solution filter.
Right-click the selection and choose
.
Add projects to solution filter
In the Solution Explorer, click Show All Files.
You will see the list of all projects in the solution. Filtered and unloaded projects will be displayed in gray with their state displayed next to them.
Select one or more projects to add to the filter, right-click the selection and choose
or . The second option will analyze project references and make sure that all projects referencing the selected ones are also added to the filter.
You can also add or remove all projects to or from the filter by right-clicking the solution node and choosing
or .