The Solution Explorer shipped with the C# DevKit already supports nesting, but it only works for Web projects. The feature is great as it allows developers to follow the single responsibility principle creating one c# class in a separate file, while still be able to group separate files/classes based of their high cohesion using a naming convention, e.g. all these classes have the same "Capture" group in the file name, e.g.
GetForms.cs
GetForms.Request.cs
GetForms.Response.cs
GetForms.Validator.cs
This feature already works for Web projects, but not for Class libraries.
If the csproj file has this declaration <Project Sdk="Microsoft.NET.Sdk.Web"> the nesting works. If the project is class library <Project Sdk="Microsoft.NET.Sdk"> , the nesting is not working. Looks like a quick fix, assuming you only need to enable same behavior for class libraries. That seems like a quick win
Suggestion for enhancement after the bug fix
VS Code's Explorer already supports file nesting as a setting called explorer.fileNesting. Documentation here. It's logical that a developer who uses VS Code and has this setting for the VS Code explorer will expect the same thing to work for C# DevKit's Solution Explorer. Suggestion is to provide a setting, which can read from these setting and apply them, but a quick win will be only to also enable file nesting for class libraries (it works in Web projects as of now).
Describe the Issue
The Solution Explorer shipped with the C# DevKit already supports nesting, but it only works for Web projects. The feature is great as it allows developers to follow the single responsibility principle creating one c# class in a separate file, while still be able to group separate files/classes based of their high cohesion using a naming convention, e.g. all these classes have the same "Capture" group in the file name, e.g.
This feature already works for Web projects, but not for Class libraries.
If the csproj file has this declaration
<Project Sdk="Microsoft.NET.Sdk.Web">
the nesting works. If the project is class library<Project Sdk="Microsoft.NET.Sdk">
, the nesting is not working. Looks like a quick fix, assuming you only need to enable same behavior for class libraries. That seems like a quick winSuggestion for enhancement after the bug fix
VS Code's Explorer already supports file nesting as a setting called
explorer.fileNesting
. Documentation here. It's logical that a developer who uses VS Code and has this setting for the VS Code explorer will expect the same thing to work for C# DevKit's Solution Explorer. Suggestion is to provide a setting, which can read from these setting and apply them, but a quick win will be only to also enable file nesting for class libraries (it works in Web projects as of now).Example of the setting below:
Steps To Reproduce
Expected Behavior
Solution Explorer should Nest the
Environment Information