.net 5.0 发布命令总结

备忘一下:

https://docs.microsoft.com/en-us/dotnet/core/deploying/

https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file

https://docs.microsoft.com/en-us/dotnet/core/deploying/ready-to-run

dotnet publish

-r win-x64 发布特定运行时 可参考https://docs.microsoft.com/en-us/dotnet/core/rid-catalog  RID目录

-p:PublishReadyToRun=true ReadyToRun编译 减少首次启动时间但体积会增大

--self-contained true 是否包含自己所需依赖的所有文件 默认true

-p:PublishSingleFile=true 是否发布单文件将所有依赖集成在一个输出文件中

posted @ 2021-05-26 11:19  dongzhaosheng73  阅读(147)  评论(0编辑  收藏  举报