dotnet publish -c Release

cmd到入口项目目录下,然后再执行该命令,才是真正的发布;

原文地址:https://www.cnblogs.com/lishidefengchen/p/13294543.html