Sry I am just starting with programming, so it may be that my decisive way is really not the best, but I ran into the same problem recently.
To solve this problem, I analyzed all the solution elements in the list, and later I just checked if the relational elements path has the suffix ".csproj" or any other project that I need and wrote them in a new one. Maybe this can help you?
source share