Home Backend Development C#.Net Tutorial .NET Core CLI tool documentation dotnet-publish

.NET Core CLI tool documentation dotnet-publish

May 26, 2017 pm 01:34 PM

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

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1659
14
PHP Tutorial
1258
29
C# Tutorial
1233
24
How to enable Core Isolation's memory integrity feature in Windows 11 How to enable Core Isolation's memory integrity feature in Windows 11 May 10, 2023 pm 11:49 PM

Microsoft's Windows 11 2022 Update (22H2) enables CoreIsolation's memory integrity protection by default. However, if you are running an older version of the operating system, such as Windows 11 2022 Update (22H1), you will need to turn this feature on manually. Turn on CoreIsolation's Memory Integrity feature in Windows 11 For users who don't know about Core Isolation, it's a security process designed to protect basic core activities on Windows from malicious programs by isolating them in memory. This process, combined with the memory integrity feature, ensures

What does computer core mean? What does computer core mean? Sep 05, 2022 am 11:24 AM

Core has two meanings in computers: 1. The core, also known as the core, is the most important component of the CPU. All calculations, accepting storage commands, and processing data of the CPU are performed by the core; 2. Core, core is Intel's processor Name, Core is the processor brand launched by Intel after the Pentium processor. It has currently released twelfth generation Core processors.

How to Fix Processor Thermal Trip Error in Windows 11/10 [Fix] How to Fix Processor Thermal Trip Error in Windows 11/10 [Fix] Apr 17, 2023 am 08:13 AM

Most of the devices, such as laptops and desktops, have been heavily used by young gamers and coders for a long time. The system sometimes hangs due to application overload. This forces users to shut down their systems. This mainly happens to players who install and play heavy games. When the system tries to boot after force shutdown, it throws an error on a black screen as shown below: Below are the warnings detected during this boot. These can be viewed in the settings on the event log page. Warning: Processor thermal trip. Press any key to continue. ..These types of warning messages are always thrown when the processor temperature of a desktop or laptop exceeds its threshold temperature. Listed below are the reasons why this happens on Windows systems. Many heavy applications are in

Share several .NET open source AI and LLM related project frameworks Share several .NET open source AI and LLM related project frameworks May 06, 2024 pm 04:43 PM

The development of artificial intelligence (AI) technologies is in full swing today, and they have shown great potential and influence in various fields. Today Dayao will share with you 4 .NET open source AI model LLM related project frameworks, hoping to provide you with some reference. https://github.com/YSGStudyHards/DotNetGuide/blob/main/docs/DotNet/DotNetProjectPicks.mdSemanticKernelSemanticKernel is an open source software development kit (SDK) designed to integrate large language models (LLM) such as OpenAI, Azure

What are the employment prospects of C#? What are the employment prospects of C#? Oct 19, 2023 am 11:02 AM

Whether you are a beginner or an experienced professional, mastering C# will pave the way for your career.

.NET performance optimization technology for developers .NET performance optimization technology for developers Sep 12, 2023 am 10:43 AM

If you are a .NET developer, you must be aware of the importance of optimizing functionality and performance in delivering high-quality software. By making expert use of the provided resources and reducing website load times, you not only create a pleasant experience for your users but also reduce infrastructure costs.

.NET Core cross-platform application development practice: a seamless journey from Windows to Linux and macOS .NET Core cross-platform application development practice: a seamless journey from Windows to Linux and macOS Feb 26, 2024 pm 12:55 PM

With the launch of .NETCore, .NET developers have a new opportunity to easily write and run .NET applications on multiple operating systems. This article will delve into how to use .NETCore to achieve cross-platform application development, and share best practice experience on operating systems such as Windows, Linux, and macOS. 1. Prepare the development environment. To start cross-platform application development, you first need to prepare the development environment for each target platform. Windows On Windows, you can install .NETCoreSDK through Visual Studio. After installation is complete, you can create and run .NETCore projects through Visual Studio. Li

Performance differences between Java framework and .NET framework Performance differences between Java framework and .NET framework Jun 03, 2024 am 09:19 AM

In terms of high-concurrency request processing, .NETASP.NETCoreWebAPI performs better than JavaSpringMVC. The reasons include: AOT early compilation, which reduces startup time; more refined memory management, where developers are responsible for allocating and releasing object memory.

See all articles