This is going to be a very short post. I am adding it because I have run across it several times and every time I need to Google it (or ask a co-worker) how to fix it.
Why is my browser launching a new window?
When you run your web application one of two things may happen:
Your application may open in:
- A new browser tab opens in current web browser
- New web browser opens.
The issue with this is that when it opens in the current web browser if you close the tab the application will continue to run. However if you close it when it has opened in a new web browser window then your application will stop.
Open in current browser
How to not launch a browser.
Go to the launchSettings.json file in your Visual studio project, look for the following line.
change it to
This will stop it from launching a browser at all.