1dotnet sln command(1)              .NET Core             dotnet sln command(1)
2
3
4

dotnet sln

NAME

7       dotnet sln - Modifies a .NET Core solution file.
8

SYNOPSIS

10              dotnet sln [<SOLUTION_NAME>] add <PROJECT> <PROJECT> ...
11              dotnet sln [<SOLUTION_NAME>] add <GLOBBING_PATTERN>
12              dotnet sln [<SOLUTION_NAME>] remove <PROJECT> <PROJECT> ...
13              dotnet sln [<SOLUTION_NAME>] remove <GLOBBING_PATTERN>
14              dotnet sln [<SOLUTION_NAME>] list
15              dotnet sln [-h|--help]
16

DESCRIPTION

18       The  dotnet  sln  command provides a convenient way to add, remove, and
19       list projects in a solution file.
20
21       To use the dotnet sln command, the solution file  must  already  exist.
22       If you need to create one, use the dotnet new command, like in the fol‐
23       lowing example:
24
25              dotnet new sln
26
27   Commands
28       add <PROJECT> ...
29
30       add <GLOBBING_PATTERN>
31
32       Adds a project or multiple projects to  the  solution  file.   Globbing
33       patterns are supported on Unix/Linux based terminals.
34
35       remove <PROJECT> ...
36
37       remove <GLOBBING_PATTERN>
38
39       Removes  a  project or multiple projects from the solution file.  Glob‐
40       bing patterns are supported on Unix/Linux based terminals.
41
42       list
43
44       Lists all projects in a solution file.
45
46   Arguments
47       SOLUTION_NAME
48
49       Solution file to use.  If not specified, the command searches the  cur‐
50       rent  directory  for  one.  If there are multiple solution files in the
51       directory, one must be specified.
52

OPTIONS

54       -h|--help
55
56       Prints out a short help for the command.
57

EXAMPLES

59       Add a C# project to a solution:
60
61       dotnet sln todo.sln add todo-app/todo-app.csproj
62
63       Remove a C# project from a solution:
64
65       dotnet sln todo.sln remove todo-app/todo-app.csproj
66
67       Add multiple C# projects to a solution:
68
69       dotnet  sln  todo.sln   add   todo-app/todo-app.csproj   back-end/back-
70       end.csproj
71
72       Remove multiple C# projects from a solution:
73
74       dotnet  sln  todo.sln  remove  todo-app/todo-app.csproj  back-end/back-
75       end.csproj
76
77       Add multiple C# projects to a solution using a globbing pattern:
78
79       dotnet sln todo.sln add **/*.csproj
80
81       Remove multiple C# projects from a solution using a globbing pattern:
82
83       dotnet sln todo.sln remove **/*.csproj
84
85              [!NOTE] Globbing is not a CLI feature but rather  a  feature  of
86              the  command  shell.  To successfully expand the files, you must
87              use a shell that supports globbing.  For more information  about
88              globbing, see Wikipedia.
89
90
91
92                                                         dotnet sln command(1)
Impressum