Skip to content

Provide a way to launch the browser when running dotnet run #9038

Open
@danroth27

Description

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.

@mlorbetske @natemcmaster @livarcocc @KathleenDollard

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Area-CLIgood first issueIssues that would be a good fit for someone new to the repository. Narrow in scope, well-defined.help wantedIssues that we would accept external contributions on. Also known as up-for-grabs.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions