The document, Fundamentals / Environments, does not explain that dotnet run will attempt to load in launchSettings.json if available, and that this overrides any settings in environment variables.
https://github.com/aspnet/Docs/blob/master/aspnetcore/fundamentals/environments.md
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments
Ever since this issue (https://github.com/dotnet/cli/issues/6617) was resolved, the CLI will use launchSettings by default, which at least confused me a whole lot, as the above document only described the environment variable.
Noting that the link to the topic for the --no-launch-profile switch for dotnet run is ...
https://docs.microsoft.com/dotnet/core/tools/dotnet-run#options
@guardrex xref links don't work across repo's AFAIK.
Most helpful comment
Noting that the link to the topic for the
--no-launch-profileswitch fordotnet runis ...https://docs.microsoft.com/dotnet/core/tools/dotnet-run#options