ASP.NET Core 6: how to bring the console window to the foreground upon launch

Viewed 302

After creating a new project using the "ASP.NET Core Web App" template, when I run the project, I want the console window to automatically be brought to the foreground. Since I'm mainly developing a web API, I don't want the browser to launch (which I've done in launchsettings.json), but do want the console window to show.

I've verified that this is the default behaviour when creating a .NET Core 6 Console app, yet I can't find the settings responsible for this desired behaviour.

1 Answers

It can be achieved easily just by changing a debug setting. It may be a little bit different in old versions of Visual Studio!

VS2022

1. Open Launch Profiles window:

enter image description here

2. Select relevant profile from opened window and change Launch browser setting(uncheck it)

enter image description here

3. Save the change if there is any Save button. and run the project.

Related