1.选择发布到文件夹
2.选择core版本
3.安装配置环境 dotnet-hosting-3.1.5-win.exe和windowsdesktop-runtime-3.1.5-win-x64.exe
runtime: https://dotnet.microsoft.com/download/
hosting: https://download.visualstudio.microsoft.com/download/pr/7c30d3a1-f519-4167-b850-b9c49bf2aa0e/dbfa957a76a41a1e1795f59d400d4ccd/dotnet-hosting-3.1.5-win.exe
4.IIS
确保模块里面有core模块
最后附上微软官方教程
https://docs.microsoft.com/zh-cn/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1