\f[C]dotnet\ publish\f[] compiles the application, reads through its dependencies specified in the project file, and publishes the resulting set of files to a directory.
\f[I].runtime.config.json\f[] file that specifies the shared runtime that the application expects, as well as other configuration options for the runtime (for example, garbage collection type).
Publishes the application for the specified target framework.
You must specify the target framework in the project file.
.PP
\f[C]\-\-force\f[]
.PP
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[] file.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-manifest\ <PATH_TO_MANIFEST_FILE>\f[]
.PP
Specifies one or several target manifests to use to trim the set of packages published with the app.
The manifest file is part of the output of the \f[C]dotnet\ store\f[].
To specify multiple manifests, add a \f[C]\-\-manifest\f[] option for each manifest.
This option is available starting with .NET Core 2.0 SDK.
.PP
\f[C]\-\-no\-build\f[]
.PP
Doesn't build the project before publishing.
It also implicit sets the \f[C]\-\-no\-restore\f[] flag.
.PP
\f[C]\-\-no\-dependencies\f[]
.PP
Ignores project\-to\-project references and only restores the root project.
.PP
\f[C]\-\-no\-restore\f[]
.PP
Doesn't execute an implicit restore when running the command.
.PP
\f[C]\-o|\-\-output\ <OUTPUT_DIRECTORY>\f[]
.PP
Specifies the path for the output directory.
If not specified, it defaults to \f[I]./bin/[configuration]/[framework]/publish/\f[] for a framework\-dependent deployment or \f[I]./bin/[configuration]/[framework]/[runtime]/publish/\f[] for a self\-contained deployment.
If the path is relative, the output directory generated is relative to the project file location, not to the current working directory.
.PP
\f[C]\-\-self\-contained\f[]
.PP
Publishes the .NET Core runtime with your application so the runtime doesn't need to be installed on the target machine.
If a runtime identifier is specified, its default value is \f[C]true\f[].
For more information about the different deployment types, see .NET Core application deployment.
.PP
\f[C]\-r|\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Publishes the application for a given runtime.
This is used when creating a self\-contained deployment (SCD).
For a list of Runtime Identifiers (RIDs), see the RID catalog.
Default is to publish a framework\-dependent deployment (FDD).
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
.PP
\f[C]\-\-version\-suffix\ <VERSION_SUFFIX>\f[]
.PP
Defines the version suffix to replace the asterisk (\f[C]*\f[]) in the version field of the project file.
If not specified, it defaults to \f[I]./bin/[configuration]/[framework]/publish/\f[] for a framework\-dependent deployment or \f[I]./bin/[configuration]/[framework]/[runtime]/publish/\f[] for a self\-contained deployment.
If the path is relative, the output directory generated is relative to the project file location, not to the current working directory.
If not specified, it defaults to \f[I]./bin/[configuration]/[framework]/publish/\f[] for a framework\-dependent deployment or \f[I]./bin/[configuration]/[framework]/[runtime]/publish/\f[] for a self\-contained deployment.
If the path is relative, the output directory generated is relative to the project file location, not to the current working directory.
Publish the current application using the \f[C]netcoreapp1.1\f[] framework and the runtime for \f[C]OS\ X\ 10.10\f[] (you must list this RID in the project file).
Publish the current application but don't restore project\-to\-project (P2P) references, just the root project during the restore operation (.NET Core SDK 2.0 and later versions):