Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUGGESTION] Add ability to open solution filters #103

Open
levimatheri opened this issue Jun 10, 2023 · 10 comments
Open

[SUGGESTION] Add ability to open solution filters #103

levimatheri opened this issue Jun 10, 2023 · 10 comments
Labels
area-solution Solution explorer enhancement New feature or request
Milestone

Comments

@levimatheri
Copy link

Describe the feature you'd like

With Visual Studio 2022, we are able to setup and use solution filters (*.slnf), which allows us to only load certain projects and not the entire solution. This would be really nice with C# dev kit to be able to do the same in VS Code

Alternatives considered

N/A

Environment Information

N/A

@levimatheri levimatheri added the enhancement New feature or request label Jun 10, 2023
@smitpatel smitpatel added the area-solution Solution explorer label Jun 11, 2023
@mattleibow
Copy link

This is quite a high priority for project that are semi-complex. I am working on the maui repository and I can't get anything to work as the restore fails right at the beginning.

The solution has a whole collection of platform-specific projects, and when I am running on macOS all my Windows/WPF/WinForms project just stop everything.

I have a set of solution filters that I use today in main VS and also to build on the CLI. The only part that is missing is the solution filters.

My current workaround is to add a new solution that is the same as a solution filter just for VSCode, but it is not the best as thing go out of sync. And the sln file format is not like anything amazing to even touch. So nightmares entail when trying to sync manually.

@ZacharyPatten
Copy link

Not only would it be nice to support .slnf files, but right now there is actually a bug. If you manually set an .slnf file in the settings.json such as "dotnet.defaultSolution": "dotnet-console-games.slnf", then the "Open Solution" button that appears in the Solution Explorer will be unresponsive. You have to manually remove the .slnf file in the settings.json and restart the extension and/or Visual Studio code for it to become responsive again.

@fforjan
Copy link

fforjan commented Sep 1, 2023

Same request for us, we have one solution which contains everything, some C++, some C# with .net472 and some asp.net core with .net 6.
We already have a set of solution filters available to use for Visual Studio to only work in some area.

it would be awesome to allow us to only use the asp.net core / net 6 part without all the rests.

@jchappell-cordel
Copy link

+1 from my team, we've got a fairly large legacy mono-repo with ~15 .slnf files that help to reduce the amount of projects that we target with our overall .sln file.

@stefc
Copy link

stefc commented Oct 2, 2023

I would also like this feature inside C# Dev Kit. The slnf help us a lot on a huge solution with speed up development cycle ;)

@flensrocker
Copy link

Same here.

In my mono repo the slnf-files are in the same folder as the main sln-file. When I open that folder I want to choose, which solution(-filter) I want to open.

Thank you!

@mlancione
Copy link

Any progress on this issue? It's a very important feature for large multi-platform solutions.

@fforjan
Copy link

fforjan commented May 13, 2024

With the latest version, I can now open the solution filter in vscode.
BUT this is still broken in term of workflow

dotnet build MySolution.sln /target:Common\MyProject /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary /p:Configuration=Debug /p:Platform="Any CPU" 
MSBuild version 17.9.8+b34f75857 for .NET
wix311.ca.sdk.targets(59,5): error MSB4062: The "ReadRegistry" task could not be loaded from the assembly C:\Program Files (x86)\WiX Toolset v3.11\bin\WixTasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [Installer.csproj]
wix311.ca.sdk.targets(59,5): error MSB4062: The "ReadRegistry" task could not be loaded from the assembly C:\Program Files (x86)\WiX Toolset v3.11\bin\WixTasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [OtherInstaller.csproj]

The intent of the solution filter is to work on projects which work in VSCode, but skip the others.
In our case, we have a full solution which contains everything, including an installer.
I would like to use VSCode for a subpart of the solution, but this is still trying to load/parse everything and in this scenario, it is a bit useless unfortunately :(

@fforjan
Copy link

fforjan commented May 13, 2024

not only that but any dotnet action still work on the full solution, for example even after hacking the readregistry tasks, I can see that dotnet restore is invoke on ALL projects into the solution ?

@rmunn
Copy link

rmunn commented Nov 5, 2024

The "Open Solution" command also seems to choke on .slnf files that contain a traling comma in the projects list, even though dotnet build runs just fine. I've opened #1582 with a simple reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-solution Solution explorer enhancement New feature or request
Projects
None yet
Development

No branches or pull requests