❔ dotnet start, and profiles
When I run
dotnet run
, which profile from launchSettings.json
is chosen? There are so many ways to set profiles in .net, I'm confused.4 Replies
like, what's the point of settings up kestrel endpoints if I'm gonna set up the application urls afterwards anyways?
the docs are awful at explaining this
Best practice would be to specify with
--launch-profile
otherwise it chooses the first it finds that qualifies as "default" from this check: https://github.com/dotnet/sdk/blob/be146734f2320ee3b0bb79457d1e8e6b21281fc8/src/Cli/dotnet/commands/dotnet-run/LaunchSettings/LaunchSettingsManager.cs#L129GitHub
sdk/LaunchSettingsManager.cs at be146734f2320ee3b0bb79457d1e8e6b212...
Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI - sdk/LaunchSettingsManager.cs at be146734f2320ee3b0bb79457d1e8e6b21281fc8 · dotnet/sdk
which I think just ends up being anything with a CommandName of "Project"
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.