dotnet-installer/Documentation/manpages/sdk/dotnet-build.1
Zlatko Knezevic 4da4f95e21 Update documentation (#3549)
* Updating README.md files as well as man pages

This aligns with the latest changes in the official documentation. It also aligns dotnet test readme.md to official docs and introduces a new doc in the "Documentation" directory that deals with dotnet test protocols.
2016-06-14 06:42:21 -07:00

96 lines
3.2 KiB
Groff

.\" Automatically generated by Pandoc 1.15.1
.\"
.hy
.TH "DOTNET\-BUILD" "1" "April 2016" "" ""
.SS NAME
.PP
dotnet\-build \-\- Builds a project and all of its dependencies
.SS SYNOPSIS
.PP
\f[C]dotnet\ build\ [\-\-output]\ \ \ \ \ \ \ [\-\-build\-base\-path]\ [\-\-framework]\ \ \ \ \ \ \ [\-\-configuration]\ \ [\-\-runtime]\ [\-\-version\-suffix]\ \ \ \ \ [\-\-build\-profile]\ \ [\-\-no\-incremental]\ [\-\-no\-dependencies]\ \ \ \ \ [<project>]\f[]
.SS DESCRIPTION
.PP
The \f[C]dotnet\ build\f[] command builds multiple source file from a
source project and its dependencies into a binary.
The binary will be in Intermediate Language (IL) by default and will
have a DLL extension.
\f[C]dotnet\ build\f[] will also drop a \f[C]\\*.deps\f[] file which
outlines what the host needs to run the application.
.PP
Building requires the existence of a lock file, which means that you
have to run \f[C]dotnet\ restore\f[] (dotnet-restore.md) prior to
building your code.
.PP
Before any compilation begins, the build verb analyzes the project and
its dependencies for incremental safety checks.
If all checks pass, then build proceeds with incremental compilation of
the project and its dependencies; otherwise, it falls back to
non\-incremental compilation.
Via a profile flag, users can choose to receive additional information
on how they can improve their build times.
.PP
All projects in the dependency graph that need compilation must pass the
following safety checks in order for the compilation process to be
incremental: \- not use pre/post compile scripts \- not load compilation
tools from PATH (for example, resgen, compilers) \- use only known
compilers (csc, vbc, fsc)
.PP
In order to build an executable application, you need a special
configuration section in your project.json file:
.IP
.nf
\f[C]
{\
\ \ \ \ "compilerOptions":\ {
\ \ \ \ \ \ "emitEntryPoint":\ true
\ \ \ \ }
}
\f[]
.fi
.SS OPTIONS
.PP
\f[C]\-o\f[], \f[C]\-\-output\f[] [DIR]
.PP
Directory in which to place the built binaries.
.PP
\f[C]\-b\f[], \f[C]\-\-build\-base\-path\f[] [DIR]
.PP
Directory in which to place temporary outputs.
.PP
\f[C]\-f\f[], \f[C]\-\-framework\f[] [FRAMEWORK]
.PP
Compiles for a specific framework.
The framework needs to be defined in the project.json file.
.PP
\f[C]\-c\f[], \f[C]\-\-configuration\f[] [Debug|Release]
.PP
Defines a configuration under which to build.
If omitted, it defaults to Debug.
.PP
\f[C]\-r\f[], \f[C]\-\-runtime\f[] [RUNTIME_IDENTIFIER]
.PP
Target runtime to build for.
.PP
\-\-version\-suffix [VERSION_SUFFIX]
.PP
Defines what \f[C]*\f[] should be replaced with in the version field in
the project.json file.
The format follows NuGet\[aq]s version guidelines.
.PP
\f[C]\-\-build\-profile\f[]
.PP
Prints out the incremental safety checks that users need to address in
order for incremental compilation to be automatically turned on.
.PP
\f[C]\-\-no\-incremental\f[]
.PP
Marks the build as unsafe for incremental build.
This turns off incremental compilation and forces a clean rebuild of the
project dependency graph.
.PP
\f[C]\-\-no\-dependencies\f[]
.PP
Ignores project\-to\-project references and only builds the root project
specified to build.
.SH AUTHORS
Microsoft Corporation dotnetclifeedback\@microsoft.com.