-
Notifications
You must be signed in to change notification settings - Fork 408
Description
Visual Studio Version
17.3.4
Summary
I'm trying to nest .xsd files under .cs files.
The rules in .filenesting.json seem to have no effect on nesting between .xsd and .cs file. I've tried adding root node and set it to true, also adding remove node under dependentFileProviders, filling it with all the providers.
None of that worked worked and the .cs files are always displayed under .xsd files. This is also true when file nesting is disabled (with or without custom rules), so I'm thinking the .xsd rule is probably hard-coded. Also, creating a custom settings based on defaults, I can see no .xsd rule, further indicating that it is hard-coded somehow.
When file nesting is enabled and .filenesting.json is present, I also get a compilation warning "Some files inside the project '<project_name>' are nested under each other, and form a loop. Review the file nesting rules."
Steps to Reproduce
- Create a
.csand.xsdfiles with same name in .NET 6 project - Create a
.filenesting.jsonin solution or project folder (changing/removingrootand/or removingdependentFileProviders.removeparts will have no effect)
{ "root": true, "dependentFileProviders": { "remove": { "extensionToExtension": {}, "fileSuffixToExtension": {}, "addedExtension": {}, "pathSegment": {}, "allExtensions": {}, "fileToFile": {} }, "add": { "extensionToExtension": { "add": { ".xsd": [ ".cs" ] } } } } } - Open the project, enable file nesting and compile. You should see a yellow warning icon on
.xsdfiles in solution explorer and a warning
Expected Behavior
Nest .xsd files under .cs files.
User Impact
Slight annoyance because I see new features that seem they can be useful, only to have my hope soiled and my dreams shattered by a bug or an oversight :-D