0

Giving a simple SLN that contains the following project:

├───libs
│   ├───libA
│   │       Class1.cs
│   │       libA.csproj
│   ├───libB
│   │       Class1.cs
│   │       libB.csproj
│   └───libC
│           Class1.cs
│           libC.csproj
└───tools
    ├───toolA
    │       Program.cs
    │       toolA.csproj
    └───toolB
            Program.cs
            toolB.csproj

I would like to have an filtered SLN that only loads the projects under libs folder without having to list all the projects one by one.

I tried to create an .slnf with the following content:

{
  "solution": {
    "path": "Solution.sln",
    "projects": [
      "libs\\**\\*.csproj",
    ]
  }
}

When loading the slnf in Visual Studio 2019, none of the project are loaded when I was expecting to have see the projects under the libs folder.

I also tried a couple of other formats such as libs\\.*\\.*.csproj, but none of them seems to work.

Does filtered SLN supports regexes in the list of projects? If yes, how to use it?

Jack J Jun
  • 5,633
  • 1
  • 9
  • 27
Lucas
  • 1,171
  • 9
  • 21
  • `libs` and `tools` folders are located directly inside folder where `.sln` file is located? Did this work with specific paths instead of regex? – Chetan Apr 14 '21 at 01:38
  • 2
    There's an open request to add this, so I assume it doesn't currently exist: https://developercommunity.visualstudio.com/t/solution-filter-should-allow-for-includeexclude-ba/1090914 – devNull Apr 14 '21 at 01:55
  • @ChetanRanpariya, when I list the projects one by one, yes it works. – Lucas Apr 15 '21 at 17:03
  • @devNull, you must be right, the feature does not exist yet. Upvoting it! – Lucas Apr 15 '21 at 17:04

0 Answers0