. NET Core CLI Tools Documentation Dotnet-build

Source: Internet
Author: User


Dotnet-build--build projects and all dependencies


' Dotnet build [--output]

[--build-base-path] [--framework]  [--configuration]  [--runtime] [--version-suffix] [--build-profile]  [--no-incremental] [--no-dependencies] [<project>] '


The dotnet Build command generates a binary file from multiple source files in the source project and its dependencies. By default, the binary is in intermediate language (IL), and there will be a DLL extension. Dotnet build will also generate a \*.deps outline file that the host application needs to run.

The build needs to have a locked file, which means you must run dotnet Restore in advance to generate your code.

Generates a dependency on the verb Analysis project and its incremental security checks before any compilation begins. If all the checks pass, and then continue to build the incremental compilation with the project and its dependencies, otherwise it goes back to non-progressive compilation. Through the logo on the side, users can choose to receive additional information about how they can increase their build time.

All projects that need to be compiled in a dependency graph must pass the following security checks so that the compilation process is incremental:

Do not use pre/post compile scripts

No build tool loaded from PATH (ex: resgen, compiler)

Using a known-only compiler (CSC,VBC,FSC)

In order to generate an executable application, you need the special configuration section in your Project.json file:

{"     compileroptions": {      "emitentrypoint": True    }}


-O,--output [DIR]

The directory where the generated binaries are placed.

-B,--build-base-path [DIR]

The directory where the temporary output is placed.

-F,--framework [Framework]

Compiles a specified frame. The framework needs to be defined in the Project.json file.

-C,--configuration [debug| Release]

Define a configuration under build. If omitted, debugging is the default.

-R,--runtime [Runtime_identifier]

The target runtime for the build.

--version-suffix [Version_suffix]

defined * should be replaced in the Version field in the Project.json file. Format refers to the version style of NuGet.


Print out the security checks that the user needs to automatically open for incremental compilation resolution increments.


Marks the build as an unsafe incremental build. This turns off incremental compilation, forcing a clean rebuild of the project dependency diagram.


Ignores project-to-project references, only builds the root project of the specified build.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.