Skip to content

Commit d5fe494

Browse files
authored
make consistency edits across commands
1 parent c8f1b34 commit d5fe494

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

docs/core/tools/dotnet-build.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.date: 09/24/2025
99

1010
## Name
1111

12-
`dotnet build` - Builds a project and all of its dependencies.
12+
`dotnet build` - Builds a project, solution, or file-based program and all of its dependencies.
1313

1414
## Synopsis
1515

@@ -32,16 +32,14 @@ dotnet build -h|--help
3232

3333
## Description
3434

35-
The `dotnet build` command builds the project and its dependencies into a set of binaries. The binaries include the project's code in Intermediate Language (IL) files with a *.dll* extension. Depending on the project type and settings, other files may be included, such as:
35+
The `dotnet build` command builds the project, solution, or file-based program and its dependencies into a set of binaries. The binaries include the project's code in Intermediate Language (IL) files with a *.dll* extension. Depending on the project type and settings, other files may be included, such as:
3636

37-
- An executable that can be used to run the application, if the project type is an executable targeting .NET Core 3.0 or later.
37+
- An executable that can be used to run the application.
3838
- Symbol files used for debugging with a *.pdb* extension.
3939
- A *.deps.json* file, which lists the dependencies of the application or library.
4040
- A *.runtimeconfig.json* file, which specifies the shared runtime and its version for an application.
4141
- Other libraries that the project depends on (via project references or NuGet package references).
4242

43-
For executable projects targeting versions earlier than .NET Core 3.0, library dependencies from NuGet are typically NOT copied to the output folder. They're resolved from the NuGet global packages folder at run time. With that in mind, the product of `dotnet build` isn't ready to be transferred to another machine to run. To create a version of the application that can be deployed, you need to publish it (for example, with the [dotnet publish](dotnet-publish.md) command). For more information, see [.NET Application Deployment](../deploying/index.md).
44-
4543
For executable projects targeting .NET Core 3.0 and later, library dependencies are copied to the output folder. This means that if there isn't any other publish-specific logic (such as Web projects have), the build output should be deployable.
4644

4745
### Implicit restore
@@ -64,7 +62,7 @@ To produce a library, omit the `<OutputType>` property or change its value to `L
6462

6563
### MSBuild
6664

67-
`dotnet build` uses MSBuild to build the project, so it supports both parallel and incremental builds. For more information, see [Incremental Builds](/visualstudio/msbuild/incremental-builds).
65+
`dotnet build` uses MSBuild to build the project, solution, or file-based program. It supports both parallel and incremental builds. For more information, see [Incremental Builds](/visualstudio/msbuild/incremental-builds).
6866

6967
In addition to its options, the `dotnet build` command accepts MSBuild options, such as `-p` for setting properties or `-l` to define a logger. For more information about these options, see the [MSBuild Command-Line Reference](/visualstudio/msbuild/msbuild-command-line-reference). Or you can also use the [dotnet msbuild](dotnet-msbuild.md) command.
7068

@@ -79,7 +77,13 @@ Running `dotnet build` is equivalent to running `dotnet msbuild -restore`; howev
7977

8078
`PROJECT | SOLUTION | FILE`
8179

82-
The project or solution or C# (file-based program) file to build. If a file isn't specified, MSBuild searches the current directory for a project or solution.
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+
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+
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+
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).
8387

8488
## Options
8589

@@ -176,7 +180,7 @@ The project or solution or C# (file-based program) file to build. If a file isn'
176180
dotnet build
177181
```
178182

179-
- Build a specific project file:
183+
- Build a file-based program:
180184

181185
```dotnetcli
182186
dotnet build MyProject.cs

docs/core/tools/dotnet-clean.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet clean command
33
description: The dotnet clean command cleans the current directory.
4-
ms.date: 09/23/2025
4+
ms.date: 09/24/2025
55
---
66
# dotnet clean
77

@@ -32,7 +32,13 @@ The `dotnet clean` command cleans the output of the previous build. It's impleme
3232

3333
`PROJECT | SOLUTION | FILE`
3434

35-
The project or solution or C# (file-based program) file to operate on. If a file isn't specified, MSBuild searches the current directory for a project or solution.
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+
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+
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+
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).
3642

3743
## Options
3844

@@ -76,7 +82,7 @@ The project or solution or C# (file-based program) file to operate on. If a file
7682
dotnet clean
7783
```
7884

79-
* Clean a project in a specified file:
85+
* Clean a file-based program:
8086

8187
```dotnetcli
8288
dotnet clean Program.cs.

docs/core/tools/dotnet-publish.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ For more information, see the following resources:
116116

117117
`PROJECT | SOLUTION | FILE`
118118

119-
The project or solution or C# (file-based program) file to operate on. If a file isn't specified, MSBuild searches the current directory for a project or solution.
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.
120120

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. If the directory is not specified, it defaults to the current directory.
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.
122122

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. If the directory is not specified, it defaults to the current directory.
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.
124124

125-
* `FILE` is the path and filename of a file-based app. Files-based apps are programs 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 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).
126126

127127
## Options
128128

@@ -188,12 +188,6 @@ The project or solution or C# (file-based program) file to operate on. If a file
188188

189189
If you specify a relative path when publishing a solution, all output for all projects goes into the specified folder relative to the current working directory. To make publish output go to separate folders for each project, specify a relative path by using the msbuild `PublishDir` property instead of the `--output` option. For example, `dotnet publish -p:PublishDir=.\publish` sends publish output for each project to a `publish` folder under the folder that contains the project file.
190190

191-
- .NET Core 2.x SDK
192-
193-
If you specify a relative path when publishing a project, the generated output directory is relative to the project file location, not to the current working directory.
194-
195-
If you specify a relative path when publishing a solution, each project's output goes into a separate folder relative to the project file location. If you specify an absolute path when publishing a solution, all publish output for all projects goes into the specified folder.
196-
197191
[!INCLUDE [os](../../../includes/cli-os.md)]
198192

199193
- **`--sc|--self-contained [true|false]`**

docs/core/tools/dotnet-restore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The project or solution or C# (file-based program) file to restore. If a file is
9494

9595
* `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.
9696

97-
* `FILE` is the path and filename of a file-based app. Files-based apps are programs 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 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).
9898

9999
## Options
100100

0 commit comments

Comments
 (0)