1dotnet clean command - .NET Core CLI.(N1E)TdCootrneet clean command - .NET Core CLI(1)
2
3
4
7 dotnet clean - Cleans the output of a project.
8
10 .NET Core 2.x
11 dotnet clean [<PROJECT>] [-c|--configuration] [-f|--framework] [-o|--output] [-r|--runtime] [-v|--verbosity]
12 dotnet clean [-h|--help]
13
14 .NET Core 1.x
15 dotnet clean [<PROJECT>] [-c|--configuration] [-f|--framework] [-o|--output] [-v|--verbosity]
16 dotnet clean [-h|--help]
17
18 * * * * *
19
21 The dotnet clean command cleans the output of the previous build. It's
22 implemented as an MSBuild target, so the project is evaluated when the
23 command is run. Only the outputs created during the build are cleaned.
24 Both intermediate (obj) and final output (bin) folders are cleaned.
25
26 Arguments
27 PROJECT
28
29 The MSBuild project to clean. If a project file is not specified, MS‐
30 Build searches the current working directory for a file that has a file
31 extension that ends in proj and uses that file.
32
34 .NET Core 2.x
35 -c|--configuration {Debug|Release}
36
37 Defines the build configuration. The default value is Debug. This op‐
38 tion is only required when cleaning if you specified it during build
39 time.
40
41 -f|--framework <FRAMEWORK>
42
43 The framework that was specified at build time. The framework must be
44 defined in the project file. If you specified the framework at build
45 time, you must specify the framework when cleaning.
46
47 -h|--help
48
49 Prints out a short help for the command.
50
51 -o|--output <OUTPUT_DIRECTORY>
52
53 Directory in which the build outputs are placed. Specify the
54 -f|--framework <FRAMEWORK> switch with the output directory switch if
55 you specified the framework when the project was built.
56
57 -r|--runtime <RUNTIME_IDENTIFIER>
58
59 Cleans the output folder of the specified runtime. This is used when a
60 self-contained deployment was created.
61
62 -v|--verbosity <LEVEL>
63
64 Sets the verbosity level of the command. Allowed levels are q[uiet],
65 m[inimal], n[ormal], d[etailed], and diag[nostic].
66
67 .NET Core 1.x
68 -c|--configuration {Debug|Release}
69
70 Defines the build configuration. The default value is Debug. This op‐
71 tion is only required when cleaning if you specified it during build
72 time.
73
74 -f|--framework <FRAMEWORK>
75
76 The framework that was specified at build time. The framework must be
77 defined in the project file. If you specified the framework at build
78 time, you must specify the framework when cleaning.
79
80 -h|--help
81
82 Prints out a short help for the command.
83
84 -o|--output <OUTPUT_DIRECTORY>
85
86 Directory in which the build outputs are placed. Specify the
87 -f|--framework <FRAMEWORK> switch with the output directory switch if
88 you specified the framework when the project was built.
89
90 -v|--verbosity <LEVEL>
91
92 Sets the verbosity level of the command. Allowed levels are q[uiet],
93 m[inimal], n[ormal], d[etailed], and diag[nostic].
94
95 * * * * *
96
98 Clean a default build of the project:
99
100 dotnet clean
101
102 Clean a project built using the Release configuration:
103
104 dotnet clean --configuration Release
105
107 mairaw.
108
109
110
111 dotnet clean command - .NET Core CLI(1)