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/core/tools/dotnet-sln.md
+10-6Lines changed: 10 additions & 6 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: dotnet sln command
3
3
description: The dotnet-sln command provides a convenient option to add, remove, and list projects in a solution file.
4
-
ms.date: 02/24/2025
4
+
ms.date: 03/26/2025
5
5
---
6
6
# dotnet sln
7
7
@@ -80,9 +80,11 @@ dotnet sln list [-h|--help]
80
80
81
81
-**`SOLUTION_FILE`**
82
82
83
-
The solution file to use (either an *.sln* or *.slnx* file).
83
+
The solution file (*.sln* or *.slnx* file) or [solution filter](/visualstudio/msbuild/solution-filters) (*.slnf* file) to use.
84
84
85
-
If unspecified, the command searches the current directory for an *.sln* or *.slnx* file and, if it finds exactly one, uses that file. If multiple solution files are found, the user is prompted to specify a file explicitly. If none are found, the command fails.
85
+
If unspecified, the command searches the current directory for an *.sln*, *.slnx*, or *.slnf* file and, if it finds exactly one, uses that file. If multiple solution files or filters are found, the user is prompted to specify a file explicitly. If none are found, the command fails.
86
+
87
+
(Support for *.slnf* files was added in .NET SDK 9.0.3xx.)
86
88
87
89
#### Options
88
90
@@ -140,7 +142,7 @@ Removes a project or multiple projects from the solution file.
If unspecified, the command searches the current directory for an *.sln* or *.slnx* file and, if it finds exactly one, uses that file. If multiple solution files are found, the user is prompted to specify a file explicitly. If none are found, the command fails.
154
156
155
-
-**`PROJECT_PATH`**
157
+
-**`PROJECT_PATH` or `PROJECT_NAME`**
158
+
159
+
The path to, or name of, the project or projects to remove from the solution. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command.
156
160
157
-
The path to the project or projects to remove from the solution. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command.
161
+
If a project name is provided instead of a path, the project in the solution that matches the name, regardless of its path, is removed. If more than one matching project is found in the solution, the command errors out. Omit the project file extension in the name. (Support for removing projects by name was added in .NET 10.)
0 commit comments