CmdID

CmdID / Commands

dotnet-publish

Publish a .NET application and its dependencies to a directory for deployment to a hosting system. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Compile a .NET project in release mode

dotnet publish --configuration Release path/to/project_fileIdentify

Publish the .NET Core runtime with your application for the specified runtime

dotnet publish --self-contained true --runtime runtime_identifier path/to/project_fileIdentify

Package the application into a platform-specific single-file executable

dotnet publish --runtime runtime_identifier -p:PublishSingleFile=true path/to/project_fileIdentify

Trim unused libraries to reduce the deployment size of an application

dotnet publish --self-contained true --runtime runtime_identifier -p:PublishTrimmed=true path/to/project_fileIdentify

Compile a .NET project without restoring dependencies

dotnet publish --no-restore path/to/project_fileIdentify

Specify the output directory

dotnet publish --output path/to/directory path/to/project_fileIdentify