You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ide/file-nesting-solution-explorer.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: File nesting rules for Solution Explorer
3
3
description: Discover Solution Explorer in Visual Studio and review how to work with file nesting rules, presets, and customization for project-specific settings.
4
-
ms.date: 05/25/2018
4
+
ms.date: 6/4/2025
5
5
ms.topic: conceptual
6
6
helpviewer_keywords:
7
7
- "file nesting"
@@ -17,7 +17,7 @@ ms.subservice: general-ide
17
17
18
18
> [!NOTE]
19
19
> In Visual Studio 2022 version 17.2 and earlier, this feature was only supported for ASP.NET Core projects.
20
-
> In version 17.3 and later the projects targeting .NET support file nesting.
20
+
> In version 17.3 and later, all projects targeting .NET support file nesting.
21
21
22
22
## File nesting options
23
23
@@ -27,7 +27,7 @@ The available options for non-customized file nesting are:
27
27
28
28
***Off**: This option gives you a flat list of files without any nesting.
29
29
30
-
***Default**: This option gives you the default file nesting behavior in **Solution Explorer**. If no settings exist for a given project type, then no files in the project are nested. If settings exist, for example, for a web project, nesting is applied.
30
+
***Default**: This option gives you the default file nesting behavior in **Solution Explorer**. If no settings exist for a given project type, then no files in the project are nested. If settings exist (for example, for a web project), nesting is applied.
31
31
32
32
***Web**: This option applies the **Web** file nesting behavior to all the projects in the current solution. It has numerous rules, and we encourage you to check it out and tell us what you think. The following screenshot highlights just a few examples of the file nesting behavior that you get with this option:
33
33
@@ -55,7 +55,7 @@ Let’s focus on the node **dependentFileProviders** and its child nodes. Each c
55
55
56
56
***allExtensions**: Use this type of rule to nest *file.** under *file.js*
57
57
58
-
***fileToFile**: Use this type of rule to nest *bower.json* under *.bowerrc*
58
+
***fileToFile**: Use this type of rule to nest *bower.json* under `.bowerrc`
59
59
60
60
### The extensionToExtension provider
61
61
@@ -67,7 +67,7 @@ This provider lets you define file nesting rules using specific file extensions.
67
67
68
68
**cart.js* is nested under *cart.ts* because of the first **extensionToExtension** rule
69
69
70
-
**cart.js* is not nested under *cart.tsx* because **.ts** comes before **.tsx** in the rules, and there can only be one parent
70
+
**cart.js* is not nested under *cart.tsx* because `.ts` comes before `.tsx` in the rules, and there can only be one parent
71
71
72
72
**light.css* is nested under *light.sass* because of the second **extensionToExtension** rule
73
73
@@ -98,7 +98,7 @@ Consider the following example:
98
98
**file.html.css* is nested under *file.html* because of the **addedExtension** rule
99
99
100
100
> [!NOTE]
101
-
> You don't specify any file extensions for the `addedExtension` rule; it automatically applies to all file extensions. That is, any file with the same name and extension as another file plus an additional extension on the end is nested under the other file. You cannot limit the effect of this provider to just specific file extensions.
101
+
> You don't specify any file extensions for the `addedExtension` rule; it automatically applies to all file extensions. That is, any file with the same name and extension as another file plus an additional extension on the end is nested under the other file. You can't limit the effect of this provider to just specific file extensions.
102
102
103
103
### The pathSegment provider
104
104
@@ -169,9 +169,7 @@ You can create solution-specific and project-specific settings through the right
169
169
170
170
Solution-specific and project-specific settings are combined with the active Visual Studio settings. For example, you may have a blank project-specific settings file, but **Solution Explorer** is still nesting files. The nesting behavior is coming from either the solution-specific settings or the Visual Studio settings. The precedence for merging file nesting settings is: Visual Studio > Solution > Project.
171
171
172
-
You can tell Visual Studio to ignore solution-specific and project-specific settings, even if the files exist on disk, by enabling the option **Ignore solution and project settings** under **Tools** > **Options** > **ASP.NET Core** > **File Nesting**.
173
-
174
-
You can do the opposite and tell Visual Studio to *only* use the solution-specific or the project-specific settings, by setting the **root** node to **true**. Visual Studio stops merging files at that level and doesn't combine it with files higher up the hierarchy.
172
+
You can tell Visual Studio to *only* use the solution-specific or the project-specific settings, by setting the **root** node to **true**. Visual Studio stops merging files at that level and doesn't combine it with files higher up the hierarchy.
175
173
176
174
Solution-specific and project-specific settings can be checked into source control, and the entire team that works on the codebase can share them.
0 commit comments