dotnet cli
- 运行时指定环境名称为测试,PowerShell
$Env:ASPNETCORE_ENVIRONMENT = "Staging"
dotnet run --no-launch-profile
- cmd
set ASPNETCORE_ENVIRONMENT=Staging
dotnet run --no-launch-profile
$Env:ASPNETCORE_ENVIRONMENT = "Staging"
dotnet run --no-launch-profile
set ASPNETCORE_ENVIRONMENT=Staging
dotnet run --no-launch-profile