Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 57 additions & 51 deletions documentation/manpages/sdk/dotnet-build.1
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,39 @@
. ftr VB CB
. ftr VBI CBI
.\}
.TH "dotnet-build" "1" "2025-06-13" "" ".NET Documentation"
.TH "dotnet-build" "1" "2025-10-15" "" ".NET Documentation"
.hy
.SH dotnet build
.PP
\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions
\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 SDK and later versions
.SH NAME
.PP
dotnet-build - Builds a project and all of its dependencies.
dotnet-build - Builds a project, solution, or file-based app and all of its dependencies.
.SH SYNOPSIS
.IP
.nf
\f[C]
dotnet build [<PROJECT>|<SOLUTION>] [-a|--arch <ARCHITECTURE>]
dotnet build [<PROJECT>|<SOLUTION>|<FILE>] [-a|--arch <ARCHITECTURE>]
[--artifacts-path <ARTIFACTS_DIR>]
[-c|--configuration <CONFIGURATION>] [-f|--framework <FRAMEWORK>]
[--disable-build-servers]
[--force] [--interactive] [--no-dependencies] [--no-incremental]
[--no-restore] [--nologo] [--no-self-contained] [--os <OS>]
[-o|--output <OUTPUT_DIRECTORY>]
[-p|--property:<PROPERTYNAME>=<VALUE>]
[-r|--runtime <RUNTIME_IDENTIFIER>]
[--self-contained [true|false]] [--source <SOURCE>]
[--tl:[auto|on|off]] [--use-current-runtime, --ucr [true|false]]
[-c|--configuration <CONFIGURATION>] [--disable-build-servers]
[-f|--framework <FRAMEWORK>] [--force] [--interactive]
[--no-dependencies] [--no-incremental] [--no-restore] [--nologo]
[--no-self-contained] [-o|--output <OUTPUT_DIRECTORY>] [--os <OS>]
[-p|--property:<PROPERTYNAME>=<VALUE>] [-r|--runtime <RUNTIME_IDENTIFIER>]
[--sc|--self-contained] [--source <SOURCE>]
[--tl:[auto|on|off]] [ --ucr|--use-current-runtime]
[-v|--verbosity <LEVEL>] [--version-suffix <VERSION_SUFFIX>]

dotnet build -h|--help
\f[R]
.fi
.SH DESCRIPTION
.PP
The \f[V]dotnet build\f[R] command builds the project and its dependencies into a set of binaries.
The \f[V]dotnet build\f[R] command builds the project, solution, or file-based app and its dependencies into a set of binaries.
The binaries include the project\[cq]s code in Intermediate Language (IL) files with a \f[I].dll\f[R] extension.
Depending on the project type and settings, other files may be included, such as:
.IP \[bu] 2
An executable that can be used to run the application, if the project type is an executable targeting .NET Core 3.0 or later.
An executable that can be used to run the application.
.IP \[bu] 2
Symbol files used for debugging with a \f[I].pdb\f[R] extension.
.IP \[bu] 2
Expand All @@ -58,12 +56,6 @@ A \f[I].runtimeconfig.json\f[R] file, which specifies the shared runtime and its
.IP \[bu] 2
Other libraries that the project depends on (via project references or NuGet package references).
.PP
For executable projects targeting versions earlier than .NET Core 3.0, library dependencies from NuGet are typically NOT copied to the output folder.
They\[cq]re resolved from the NuGet global packages folder at run time.
With that in mind, the product of \f[V]dotnet build\f[R] isn\[cq]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 command).
For more information, see .NET Application Deployment.
.PP
For executable projects targeting .NET Core 3.0 and later, library dependencies are copied to the output folder.
This means that if there isn\[cq]t any other publish-specific logic (such as Web projects have), the build output should be deployable.
.SS Implicit restore
Expand Down Expand Up @@ -98,7 +90,8 @@ To produce a library, omit the \f[V]<OutputType>\f[R] property or change its val
The IL DLL for a library doesn\[cq]t contain entry points and can\[cq]t be executed.
.SS MSBuild
.PP
\f[V]dotnet build\f[R] uses MSBuild to build the project, so it supports both parallel and incremental builds.
\f[V]dotnet build\f[R] uses MSBuild to build the project, solution, or file-based app.
It supports both parallel and incremental builds.
For more information, see Incremental Builds.
.PP
In addition to its options, the \f[V]dotnet build\f[R] command accepts MSBuild options, such as \f[V]-p\f[R] for setting properties or \f[V]-l\f[R] to define a logger.
Expand All @@ -117,10 +110,19 @@ If the download is still running when this command finishes, the download is sto
For more information, see Advertising manifests.
.SH ARGUMENTS
.PP
\f[V]PROJECT | SOLUTION\f[R]
\f[V]PROJECT | SOLUTION | FILE\f[R]
.PP
The project or solution file to build.
If a project or solution file isn\[cq]t specified, MSBuild searches the current working directory for a file that has a file extension that ends in either \f[I]proj\f[R] or \f[I]sln\f[R] and uses that file.
The project or solution or C# (file-based app) file to operate on.
If a file isn\[cq]t specified, MSBuild searches the current directory for a project or solution.
.IP \[bu] 2
\f[V]PROJECT\f[R] 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.
.IP \[bu] 2
\f[V]SOLUTION\f[R] is the path and filename of a solution file (\f[I].sln\f[R] or \f[I].slnx\f[R] extension), or the path to a directory that contains a solution file.
.IP \[bu] 2
\f[V]FILE\f[R] is an argument added in .NET 10.
The path and filename of a file-based app.
File-based apps are contained within a single file that is built and run without a corresponding project (\f[I].csproj\f[R]) file.
For more information, see Build file-based C# apps.
.SH OPTIONS
.IP \[bu] 2
\f[B]\f[VB]-a|--arch <ARCHITECTURE>\f[B]\f[R]
Expand Down Expand Up @@ -172,12 +174,6 @@ Forces all dependencies to be resolved even if the last restore was successful.
Specifying this flag is the same as deleting the \f[I]project.assets.json\f[R] file.
.RE
.IP \[bu] 2
\f[B]\f[VB]-?|-h|--help\f[B]\f[R]
.RS 2
.PP
Prints out a description of how to use the command.
.RE
.IP \[bu] 2
\f[B]\f[VB]--interactive\f[B]\f[R]
.RS 2
.PP
Expand Down Expand Up @@ -214,9 +210,7 @@ Doesn\[cq]t display the startup banner or the copyright message.
\f[B]\f[VB]--no-self-contained\f[B]\f[R]
.RS 2
.PP
Publishes the application as a framework dependent application.
A compatible .NET runtime must be installed on the target machine to run the application.
Available since .NET 6 SDK.
Equivalent to \f[V]--self-contained false\f[R].
.RE
.IP \[bu] 2
\f[B]\f[VB]-o|--output <OUTPUT_DIRECTORY>\f[B]\f[R]
Expand Down Expand Up @@ -268,12 +262,11 @@ If you use this option with .NET 6 SDK, use \f[V]--self-contained\f[R] or \f[V]-
If not specified, the default is to build for the current OS and architecture.
.RE
.IP \[bu] 2
\f[B]\f[VB]--self-contained [true|false]\f[B]\f[R]
\f[B]\f[VB]--sc|--self-contained\f[B]\f[R]
.RS 2
.PP
Publishes the .NET runtime with the application so the runtime doesn\[cq]t need to be installed on the target machine.
The default is \f[V]true\f[R] if a runtime identifier is specified.
Available since .NET 6.
Publish the .NET runtime with your application so the runtime doesn\[cq]t need to be installed on the target machine.
The default is \f[V]true\f[R].
.RE
.IP \[bu] 2
\f[B]\f[VB]--source <SOURCE>\f[B]\f[R]
Expand All @@ -285,13 +278,13 @@ The URI of the NuGet package source to use during the restore operation.
\f[B]\f[VB]--tl:[auto|on|off]\f[B]\f[R]
.RS 2
.PP
Specifies whether the \f[I]terminal logger\f[R] should be used for the build output.
Specifies whether \f[I]Terminal Logger\f[R] should be used for the build output.
The default is \f[V]auto\f[R], which first verifies the environment before enabling terminal logging.
The environment check verifies that the terminal is capable of using modern output features and isn\[cq]t using a redirected standard output before enabling the new logger.
\f[V]on\f[R] skips the environment check and enables terminal logging.
\f[V]off\f[R] skips the environment check and uses the default console logger.
.PP
The terminal logger shows you the restore phase followed by the build phase.
Terminal Logger shows you the restore phase followed by the build phase.
During each phase, the currently building projects appear at the bottom of the terminal.
Each project that\[cq]s building outputs both the MSBuild target currently being built and the amount of time spent on that target.
You can search this information to learn more about the build.
Expand All @@ -310,23 +303,18 @@ Any diagnostics generated for that project.
This option is available starting in .NET 8.
.RE
.IP \[bu] 2
\f[B]\f[VB]-v|--verbosity <LEVEL>\f[B]\f[R]
\f[B]\f[VB]--ucr|--use-current-runtime\f[B]\f[R]
.RS 2
.PP
Sets the verbosity level of the command.
Allowed values are \f[V]q[uiet]\f[R], \f[V]m[inimal]\f[R], \f[V]n[ormal]\f[R], \f[V]d[etailed]\f[R], and \f[V]diag[nostic]\f[R].
The default is \f[V]minimal\f[R].
By default, MSBuild displays warnings and errors at all verbosity levels.
To exclude warnings, use \f[V]/property:WarningLevel=0\f[R].
For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity> and WarningLevel.
Use the current runtime as the target runtime.
.RE
.IP \[bu] 2
\f[B]\f[VB]--use-current-runtime, --ucr [true|false]\f[B]\f[R]
\f[B]\f[VB]-v|--verbosity <LEVEL>\f[B]\f[R]
.RS 2
.PP
Sets the \f[V]RuntimeIdentifier\f[R] to a platform portable \f[V]RuntimeIdentifier\f[R] based on the one of your machine.
This happens implicitly with properties that require a \f[V]RuntimeIdentifier\f[R], such as \f[V]SelfContained\f[R], \f[V]PublishAot\f[R], \f[V]PublishSelfContained\f[R], \f[V]PublishSingleFile\f[R], and \f[V]PublishReadyToRun\f[R].
If the property is set to false, that implicit resolution will no longer occur.
Sets the verbosity level of the command.
Allowed values are \f[V]q[uiet]\f[R], \f[V]m[inimal]\f[R], \f[V]n[ormal]\f[R], \f[V]d[etailed]\f[R], and \f[V]diag[nostic]\f[R].
For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity>.
.RE
.IP \[bu] 2
\f[B]\f[VB]--version-suffix <VERSION_SUFFIX>\f[B]\f[R]
Expand All @@ -336,6 +324,12 @@ Sets the value of the \f[V]$(VersionSuffix)\f[R] property to use when building t
This only works if the \f[V]$(Version)\f[R] property isn\[cq]t set.
Then, \f[V]$(Version)\f[R] is set to the \f[V]$(VersionPrefix)\f[R] combined with the \f[V]$(VersionSuffix)\f[R], separated by a dash.
.RE
.IP \[bu] 2
\f[B]\f[VB]-?|-h|--help\f[B]\f[R]
.RS 2
.PP
Prints out a description of how to use the command.
.RE
.SH EXAMPLES
.IP \[bu] 2
Build a project and its dependencies:
Expand All @@ -348,6 +342,18 @@ dotnet build
.fi
.RE
.IP \[bu] 2
Build a file-based app:
.RS 2
.IP
.nf
\f[C]
dotnet build MyProject.cs
\f[R]
.fi
.PP
File-based app support was added in .NET SDK 10.0.100.
.RE
.IP \[bu] 2
Build a project and its dependencies using Release configuration:
.RS 2
.IP
Expand Down
37 changes: 29 additions & 8 deletions documentation/manpages/sdk/dotnet-clean.1
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
. ftr VB CB
. ftr VBI CBI
.\}
.TH "dotnet-clean" "1" "2025-06-13" "" ".NET Documentation"
.TH "dotnet-clean" "1" "2025-10-15" "" ".NET Documentation"
.hy
.SH dotnet clean
.PP
\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions
\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 SDK and later versions
.SH NAME
.PP
dotnet-clean - Cleans the output of a project.
.SH SYNOPSIS
.IP
.nf
\f[C]
dotnet clean [<PROJECT>|<SOLUTION>] [--artifacts-path <ARTIFACTS_DIR>]
dotnet clean [<PROJECT>|<SOLUTION>|<FILE>] [--artifacts-path <ARTIFACTS_DIR>]
[-c|--configuration <CONFIGURATION>]
[-f|--framework <FRAMEWORK>] [--interactive]
[--nologo] [-o|--output <OUTPUT_DIRECTORY>]
Expand All @@ -44,10 +44,19 @@ Only the outputs created during the build are cleaned.
Both intermediate (\f[I]obj\f[R]) and final output (\f[I]bin\f[R]) folders are cleaned.
.SH ARGUMENTS
.PP
\f[V]PROJECT | SOLUTION\f[R]
\f[V]PROJECT | SOLUTION | FILE\f[R]
.PP
The MSBuild project or solution to clean.
If a project or solution file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in \f[I]proj\f[R] or \f[I]sln\f[R], and uses that file.
The project or solution or C# (file-based app) file to operate on.
If a file isn\[cq]t specified, MSBuild searches the current directory for a project or solution.
.IP \[bu] 2
\f[V]PROJECT\f[R] 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.
.IP \[bu] 2
\f[V]SOLUTION\f[R] is the path and filename of a solution file (\f[I].sln\f[R] or \f[I].slnx\f[R] extension), or the path to a directory that contains a solution file.
.IP \[bu] 2
\f[V]FILE\f[R] is an argument added in .NET 10.
The path and filename of a file-based app.
File-based apps are contained within a single file that is built and run without a corresponding project (\f[I].csproj\f[R]) file.
For more information, see Build file-based C# apps.
.SH OPTIONS
.IP \[bu] 2
\f[B]\f[VB]--artifacts-path <ARTIFACTS_DIR>\f[B]\f[R]
Expand Down Expand Up @@ -119,13 +128,13 @@ This is used when a self-contained deployment was created.
\f[B]\f[VB]--tl:[auto|on|off]\f[B]\f[R]
.RS 2
.PP
Specifies whether the \f[I]terminal logger\f[R] should be used for the build output.
Specifies whether \f[I]Terminal Logger\f[R] should be used for the build output.
The default is \f[V]auto\f[R], which first verifies the environment before enabling terminal logging.
The environment check verifies that the terminal is capable of using modern output features and isn\[cq]t using a redirected standard output before enabling the new logger.
\f[V]on\f[R] skips the environment check and enables terminal logging.
\f[V]off\f[R] skips the environment check and uses the default console logger.
.PP
The terminal logger shows you the restore phase followed by the build phase.
Terminal Logger shows you the restore phase followed by the build phase.
During each phase, the currently building projects appear at the bottom of the terminal.
Each project that\[cq]s building outputs both the MSBuild target currently being built and the amount of time spent on that target.
You can search this information to learn more about the build.
Expand Down Expand Up @@ -164,6 +173,18 @@ dotnet clean
.fi
.RE
.IP \[bu] 2
Clean a file-based program:
.RS 2
.IP
.nf
\f[C]
dotnet clean Program.cs.
\f[R]
.fi
.PP
File-based app support was added in .NET SDK 10.0.100.
.RE
.IP \[bu] 2
Clean a project built using the Release configuration:
.RS 2
.IP
Expand Down
13 changes: 10 additions & 3 deletions documentation/manpages/sdk/dotnet-dev-certs.1
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
. ftr VB CB
. ftr VBI CBI
.\}
.TH "dotnet-dev-certs" "1" "2025-06-13" "" ".NET Documentation"
.TH "dotnet-dev-certs" "1" "2025-10-15" "" ".NET Documentation"
.hy
.SH dotnet dev-certs
.PP
\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET Core 3.1 SDK and later versions
\f[B]This article applies to:\f[R] \[u2714]\[uFE0F] .NET 6 SDK and later versions
.SH NAME
.PP
dotnet-dev-certs - Generates a self-signed certificate to enable HTTPS use in development.
Expand All @@ -28,7 +28,8 @@ dotnet-dev-certs - Generates a self-signed certificate to enable HTTPS use in de
.nf
\f[C]
dotnet dev-certs https
[-c|--check] [--clean] [-ep|--export-path <PATH>]
[-c|--check] [--check-trust-machine-readable]
[--clean] [-ep|--export-path <PATH>]
[--format] [-i|--import] [-np|--no-password]
[-p|--password] [-q|--quiet] [-t|--trust]
[-v|--verbose] [--version]
Expand Down Expand Up @@ -91,6 +92,12 @@ Checks for the existence of the development certificate but doesn\[cq]t perform
Use this option with the \f[V]--trust\f[R] option to check if the certificate is not only valid but also trusted.
.RE
.IP \[bu] 2
\f[B]\f[VB]--check-trust-machine-readable\f[B]\f[R]
.RS 2
.PP
Same as running \f[V]--check --trust\f[R], but outputs the results in JSON.
.RE
.IP \[bu] 2
\f[B]\f[VB]--clean\f[B]\f[R]
.RS 2
.PP
Expand Down
Loading