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-build.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,11 +79,11 @@ Running `dotnet build` is equivalent to running `dotnet msbuild -restore`; howev
79
79
80
80
The project or solution or C# (file-based program) file to publish. If a file isn't specified, MSBuild searches the current directory for a project or solution.
81
81
82
-
*`PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file.
82
+
-`PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file.
83
83
84
-
*`SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
84
+
-`SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
85
85
86
-
*`FILE` is the path and filename of a file-based program. Files-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
86
+
-`FILE` is an argument added in .NET 10. The path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
87
87
88
88
## Options
89
89
@@ -184,7 +184,9 @@ The project or solution or C# (file-based program) file to publish. If a file is
184
184
185
185
```dotnetcli
186
186
dotnet build MyProject.cs
187
-
```
187
+
```
188
+
189
+
File-based program support was added in .NET SDK 10.0.100.
188
190
189
191
- Build a project and its dependencies using Release configuration:
Copy file name to clipboardExpand all lines: docs/core/tools/dotnet-clean.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,39 +34,39 @@ The `dotnet clean` command cleans the output of the previous build. It's impleme
34
34
35
35
The project or solution or C# (file-based program) file to publish. If a file isn't specified, MSBuild searches the current directory for a project or solution.
36
36
37
-
*`PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file.
37
+
-`PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file.
38
38
39
-
*`SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
39
+
-`SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
40
40
41
-
*`FILE` is the path and filename of a file-based program. Files-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
41
+
-`FILE` is an argument added in .NET 10. The path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
The [framework](../../standard/frameworks.md) that was specified at build time. The framework must be defined in the [project file](../project-sdk/overview.md). If you specified the framework at build time, you must specify the framework when cleaning.
Doesn't display the startup banner or the copyright message.
60
60
61
-
***`-o|--output <OUTPUT_DIRECTORY>`**
61
+
-**`-o|--output <OUTPUT_DIRECTORY>`**
62
62
63
63
The directory that contains the build artifacts to clean. Specify the `-f|--framework <FRAMEWORK>` switch with the output directory switch if you specified the framework when the project was built.
64
64
65
65
- .NET 7.0.200 SDK and later
66
66
67
67
If you specify the `--output` option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. The `--output` option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. For more information, see [Solution-level `--output` option no longer valid for build-related commands](../compatibility/sdk/7.0/solution-level-output-no-longer-valid.md).
68
68
69
-
***`-r|--runtime <RUNTIME_IDENTIFIER>`**
69
+
-**`-r|--runtime <RUNTIME_IDENTIFIER>`**
70
70
71
71
Cleans the output folder of the specified runtime. This is used when a [self-contained deployment](../deploying/index.md#self-contained-deployment) was created.
72
72
@@ -76,19 +76,21 @@ The project or solution or C# (file-based program) file to publish. If a file is
76
76
77
77
## Examples
78
78
79
-
* Clean a default build of the project:
79
+
- Clean a default build of the project:
80
80
81
81
```dotnetcli
82
82
dotnet clean
83
83
```
84
84
85
-
* Clean a file-based program:
85
+
- Clean a file-based program:
86
86
87
87
```dotnetcli
88
88
dotnet clean Program.cs.
89
89
```
90
90
91
-
* Clean a project built using the Release configuration:
91
+
File-based program support was added in .NET SDK 10.0.100.
92
+
93
+
- Clean a project built using the Release configuration:
Copy file name to clipboardExpand all lines: docs/core/tools/dotnet-publish.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,11 +118,11 @@ For more information, see the following resources:
118
118
119
119
The project or solution or C# (file-based program) file to publish. If a file isn't specified, MSBuild searches the current directory for a project or solution.
120
120
121
-
*`PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file.
121
+
-`PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file.
122
122
123
-
*`SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
123
+
-`SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file.
124
124
125
-
*`FILE` is the path and filename of a file-based program. Files-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
125
+
-`FILE` is an argument added in .NET 10. The path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
126
126
127
127
## Options
128
128
@@ -270,6 +270,8 @@ The project or solution or C# (file-based program) file to publish. If a file is
270
270
dotnet publish app.cs
271
271
```
272
272
273
+
File-based program support was added in .NET SDK 10.0.100.
Copy file name to clipboardExpand all lines: docs/core/tools/dotnet-restore.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,11 +90,11 @@ There are three specific settings that `dotnet restore` ignores:
90
90
91
91
The project or solution or C# (file-based program) file to restore. If a file isn't specified, MSBuild searches the current directory for a project or solution.
92
92
93
-
*`PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file. If the directory is not specified, it defaults to the current directory.
93
+
-`PROJECT` is the path and filename of a C#, F#, or Visual Basic project file, or the path to a directory that contains a C#, F#, or Visual Basic project file. If the directory is not specified, it defaults to the current directory.
94
94
95
-
*`SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file. If the directory is not specified, it defaults to the current directory.
95
+
-`SOLUTION` is the path and filename of a solution file (*.sln* or *.slnx* extension), or the path to a directory that contains a solution file. If the directory is not specified, it defaults to the current directory.
96
96
97
-
*`FILE` is the path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
97
+
-`FILE` is an argument added in .NET 10. The path and filename of a file-based program. File-based programs are contained within a single `*.cs` file that are built and run without a corresponding project (`*.csproj`) file. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
98
98
99
99
## Options
100
100
@@ -190,19 +190,19 @@ The project or solution or C# (file-based program) file to restore. If a file is
190
190
dotnet restore ./projects/app1/app1.csproj
191
191
```
192
192
193
-
- Restore the dependencies and tools for the project in the current directory using the file path provided as the source:
193
+
- Restore the dependencies and tools for the project in the current directory using the file path provided as the source:
194
194
195
195
```dotnetcli
196
196
dotnet restore -s c:\packages\mypackages
197
197
```
198
198
199
-
- Restore the dependencies and tools for the project in the current directory using the two file paths provided as sources:
199
+
- Restore the dependencies and tools for the project in the current directory using the two file paths provided as sources:
Copy file name to clipboardExpand all lines: docs/core/tools/dotnet-run.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,8 @@ To run the application, the `dotnet run` command resolves the dependencies of th
85
85
86
86
The path to the file-based program to run. This option can be passed as the first argument if there is no project in the current directory. For more information, see [Build file-based C# programs](/dotnet/csharp/fundamentals/tutorials/file-based-programs).
87
87
88
+
Introduced in .NET SDK 10.0.100.
89
+
88
90
-**`--force`**
89
91
90
92
Forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is the same as deleting the *project.assets.json* file.
@@ -171,6 +173,8 @@ The environment is constructed in the same order as this list, so the `-e|--envi
171
173
dotnet run ConsoleApp.cs -- arg1 arg2
172
174
```
173
175
176
+
File-based program support was added in .NET SDK 10.0.100.
0 commit comments