Provide a way to launch the browser when running dotnet run
#9038
Open
Description
opened on Jan 26, 2018
It would be great if there was a way to run an ASP.NET Core app from the command line using dotnet run
and have the default browser launch at the right URL. CLIs for other platforms let you do this. For example, with the Angular CLI you can do ng serve --open
to both run the app and open the default browser.
This would be particularly useful for projects that you created using VS, which generate random ports for the server URLs.
There are already launchBrowser
and launchUrl
properties the launch profiles in launchSettings.json
that let you specify that you want this behavior in VS.
We would also want this to work with dotnet watch
without having the browser pop up multiple times, which may require some coordination.
Activity