JetBrains Rider 2024.1 Help

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

  1. 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.

  2. 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

  1. Solution filters are opened the same way as normal .sln solution files.

  2. 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:

    JetBrains Rider: Solution filter in the Solution Explorer

    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

  1. Select one or more projects to remove from the solution filter.

  2. Right-click the selection and choose Solution Filter | Remove Projects.

Add projects to solution filter

  1. In the Solution Explorer, click Show all files Show All Files.

  2. 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.

    JetBrains Rider: Adding projects to solution filter
  3. Select one or more projects to add to the filter, right-click the selection and choose Solution Filter | Add Projects or Solution Filter | Add Projects with Dependencies. 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 Solution Filter | Add Projects or Solution Filter | Remove Projects.

Last modified: 11 February 2024