Skip to content
Merged
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
54 changes: 35 additions & 19 deletions documentation/manpages/sdk/dotnet-build.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-build" "1" "2025-06-13" "" ".NET Documentation"
.TH "dotnet-build" "1" "2025-09-30" "" ".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 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]
Expand All @@ -35,7 +35,7 @@ dotnet build [<PROJECT>|<SOLUTION>] [-a|--arch <ARCHITECTURE>]
[-o|--output <OUTPUT_DIRECTORY>]
[-p|--property:<PROPERTYNAME>=<VALUE>]
[-r|--runtime <RUNTIME_IDENTIFIER>]
[--self-contained [true|false]] [--source <SOURCE>]
[-sc|--self-contained [true|false]] [--source <SOURCE>]
[--tl:[auto|on|off]] [--use-current-runtime, --ucr [true|false]]
[-v|--verbosity <LEVEL>] [--version-suffix <VERSION_SUFFIX>]

Expand All @@ -44,11 +44,11 @@ dotnet build -h|--help
.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 +58,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 +92,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 +112,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 @@ -285,13 +289,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 Down Expand Up @@ -348,6 +352,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-09-30" "" ".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 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
6 changes: 3 additions & 3 deletions documentation/manpages/sdk/dotnet-pack.1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
. ftr VB CB
. ftr VBI CBI
.\}
.TH "dotnet-pack" "1" "2025-06-13" "" ".NET Documentation"
.TH "dotnet-pack" "1" "2025-09-30" "" ".NET Documentation"
.hy
.SH dotnet pack
.PP
Expand Down Expand Up @@ -202,13 +202,13 @@ For more information, see .NET Blog: .NET Framework 4.5.1 Supports Microsoft Sec
\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
47 changes: 26 additions & 21 deletions documentation/manpages/sdk/dotnet-publish.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-publish" "1" "2025-08-29" "" ".NET Documentation"
.TH "dotnet-publish" "1" "2025-09-30" "" ".NET Documentation"
.hy
.SH dotnet publish
.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 and later versions
.SH NAME
.PP
dotnet-publish - Publishes the application and its dependencies to a folder for deployment to a hosting system.
.SH SYNOPSIS
.IP
.nf
\f[C]
dotnet publish [<PROJECT>|<SOLUTION>] [-a|--arch <ARCHITECTURE>]
dotnet publish [<PROJECT>|<SOLUTION>|<FILE>] [-a|--arch <ARCHITECTURE>]
[--artifacts-path <ARTIFACTS_DIR>]
[-c|--configuration <CONFIGURATION>] [--disable-build-servers]
[-f|--framework <FRAMEWORK>] [--force] [--interactive]
Expand Down Expand Up @@ -172,18 +172,20 @@ When you run this command, it initiates an asynchronous background download of a
If the download is still running when this command finishes, the download is stopped.
For more information, see Advertising manifests.
.SH ARGUMENTS
.IP \[bu] 2
\f[B]\f[VB]PROJECT|SOLUTION\f[B]\f[R]
.RS 2
.PP
The project or solution to publish.
\f[V]PROJECT | SOLUTION | FILE\f[R]
.PP
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.
If the directory is not specified, it defaults to the current directory.
.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.
If the directory is not specified, it defaults to the current directory.
.RE
.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 @@ -320,15 +322,6 @@ If you specify a relative path when publishing a solution, all output for all pr
To make publish output go to separate folders for each project, specify a relative path by using the msbuild \f[V]PublishDir\f[R] property instead of the \f[V]--output\f[R] option.
For example, \f[V]dotnet publish -p:PublishDir=.\[rs]publish\f[R] sends publish output for each project to a \f[V]publish\f[R] folder under the folder that contains the project file.
.RE
.IP \[bu] 2
\&.NET Core 2.x SDK
.RS 2
.PP
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.
.PP
If you specify a relative path when publishing a solution, each project\[cq]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.
.RE
.RE
.IP \[bu] 2
\f[B]\f[VB]--os <OS>\f[B]\f[R]
Expand Down Expand Up @@ -376,13 +369,13 @@ If you use this option, use \f[V]--self-contained\f[R] or \f[V]--no-self-contain
\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 @@ -491,6 +484,18 @@ dotnet publish --no-dependencies
\f[R]
.fi
.RE
.IP \[bu] 2
Publish the file-based C# program \f[I]app.cs\f[R] in the current directory:
.RS 2
.IP
.nf
\f[C]
dotnet publish app.cs
\f[R]
.fi
.PP
File-based program support was added in .NET SDK 10.0.100.
.RE
.SH SEE ALSO
.IP \[bu] 2
\&.NET application publishing overview
Expand Down
Loading