在web.config 中aspNetCore节点加入即可
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
.net 5 发布到IIS 如要装的运行环境
https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-5.0.11-windows-x64-installer