dotnet cli

  • The runtime specifies the environment name as Test, PowerShell
$Env:ASPNETCORE_ENVIRONMENT = "Staging"

dotnet run --no-launch-profile
Copy the code
  • cmd
set ASPNETCORE_ENVIRONMENT=Staging

dotnet run --no-launch-profile
Copy the code