更新时间:2022-12-25 16:19:08
使用 dotnet构建命令,您可以指定--runtime
标志
Using dotnet build command, you may specify --runtime
flag
-r |-运行时< RUNTIME_IDENTIFIER>
-r|--runtime < RUNTIME_IDENTIFIER >
要为其构建目标运行时.有关可以使用的运行时标识符(RID)的列表,请参见 RID目录.
Target runtime to build for. For a list of Runtime Identifiers (RIDs) you can use, see the RID catalog.
代表具体操作系统的
RID通常遵循这种模式[os].[version]-[arch]
RIDs that represent concrete operating systems usually follow this pattern [os].[version]-[arch]
例如,要为Ubuntu 16.04运行时构建项目及其依赖项,请使用
Fo example, to build a project and its dependencies for Ubuntu 16.04 runtime use:
dotnet build --runtime ubuntu.16.04-x64