Reputation: 10469
I am trying to nest files by pathSegment
in Visual Studio 2017 for ASP.NET Core project.
I added .filenesting.json
file to solution folder with content:
{
"help": "https://go.microsoft.com/fwlink/?linkid=866610",
"root": true, //Also tried with false
"dependentFileProviders": {
"add": {
"pathSegment": {}
}
}
}
but it's not working even when restarting VS. I think it should work, based on this documentation.
Not sure if file nesting should be enabled or disabled.
Problem is I can not see solution settings in dropdown:
but it is under edit:
I also tried with custom setting (not solution) and it also doesn't work. What did I miss?
Upvotes: 5
Views: 573
Reputation: 630627
I think the documentation is wrong here - that screenshot is missing the actual rules. I dug into it for Stack Overflow and hit the same thing...here's what actually works for your case in .filenesting.json
:
{
"help": "https://go.microsoft.com/fwlink/?linkid=866610",
"root": true,
"dependentFileProviders": {
"add": {
"pathSegment": {
"add": {
"Help.*": [ ".cs" ]
}
}
}
}
}
The only important diff (AFAIK) is the actual rule "add"
itself.
Upvotes: 8