Web项目开启或者关闭文件嵌套
此功能对于Web项目来说默认开启,具体可通过此按钮关闭或开启
非Web应用中启用该功能
可在需要应用的csproj中添加下述代码保存即可开启该按钮。
<ItemGroup> <ProjectCapability Include="ConfigurableFileNestingFeatureEnabled" /> </ItemGroup>
部分类型无法进行嵌套
1. 点击
2. 选择Add Custom Settings
3. 命名选择模板
4. Edit Custom Settings,选择刚刚创建的Nesting Setting
5. 如果要让.yaml类型的文件进行折叠嵌套,可添加
更多用法可参考:File nesting rules for Solution Explorer - Visual Studio (Windows) | Microsoft Learn