Linux 上的開發

Add Package from NuGet
# The internet is required
cd /path/to/your/project
dotnet add package MySql.Data

# Without the internet
# Download the package from
dotnet add package MySql.Data --source <path-to-package>

# Verify the package installer
dotnet list package
Publishing Applications
# Publish the framework-dependent application
dotnet publish my-app -f net6.0 -c Release

# Optional: If the application is for RHEL only, trim out the dependencies needed for other platforms
# Replace architecture based on the platform you are using
#   - For Intel: x64
#   - For IBM Z and LinuxONE: s390x
#   - For 64-bit Arm: arm64
dotnet publish my-app -f net6.0 -c Release -r rhel.8-architecture --self-contained false

Revision #5
Created 19 January 2023 09:57:02 by Admin
Updated 19 January 2023 11:51:58 by Admin