.NET Core CLI tool documentation dotnet-publish

高洛峰
Release: 2017-05-26 13:34:02
Original
2461 people have browsed it

Name

dotnet-publish - Package the application and all its dependencies into a folder, get ready to publish

Summary

`dotnet publish [--framework]

[--runtime] [--build-base-path] [--output]  
[--version-suffix] [--configuration]  
[<project>]`
Copy after login

Description

dotnet publish Compile the application, By reading the dependencies specified in the project.json file and publishing the result set files to a directory.

Depending on the type of portable app, the resulting directory will contain the following:

Portable Application - The application's intermediate language (IL) code and all the application's associated dependencies.

Local Dependencies for Portable Apps - Supported platforms with each local dependency in the above subdirectory.

Self-Contained Application - Same as above, with the entire runtime for the target platform attached.

Option

[project]

dotnet publish requires access to the project.json file to work. If it is not called with a specified [project], project.json in the current directory will be the default.
If no project.json can be found, dotnet publish will throw an error.

-f, --framework [FID]

Publish an application with the given framework identification (FID). If not specified, FID is read from project.json. The command will throw an error when no valid frame is found. If multiple valid frames are found, the command will issue all valid frames.

-r, --runtime [RID]

Release the given runtime application.

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

Directory for temporary output.

-o, --output

Specify the path where to place the directory. If not specified, it will default to ./bin/[configuration]/[framework]/ for portable applications or ./bin/[configuration]/[framework]/[runtime] for self-contained applications.

--version-suffix [VERSION_SUFFIX]

Defines what * is replaced in the version field in the project.json file.

-c, --configuration [Debug|Release]

Configuration when releasing. The default value is Debug.

Example

dotnet publish

Publish an application using the framework found in project.json. If project.json contains a runtimes node, the published RID is the current platform.

dotnet publish ~/projects/app1/project.json

Publish the application using the specified project.json.

dotnet publish --framework netcoreapp1.0

Use the netcoreapp1.0 framework to publish the current application.

dotnet publish --framework netcoreapp1.0 --runtime osx.10.11-x64

Publish the current application using the netcoreapp1.0 framework and the OS X 10.10 runtime. This RID must exist in the runtimes node in project.json.

【Related recommendations】

1. Graphic verification code for .Net Core

2. .NET Core configuration file loading and DI injection of configuration data

3. Detailed introduction to ZKEACMS for .Net Core

4. Share the example code of using forms verification in .net MVC

5. How to make http request under .net core?

6. An example tutorial of running ZKEACMS on CentOS

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template