Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my .NET 5.0 application log to an 'npm' console window in VS2019?

I recently switched from building a project in VS Code to Visual Studio 2019.

In VS Code, the output was routed to the Output window in VS Code.

In Visual Studio 2019, the output goes to a console prompt titled "npm" which must remain open otherwise the program terminates. This happens whether I am debugging the program or not.

How can I prevent this behavior?

1

like image 213
Badger Avatar asked Jan 26 '26 19:01

Badger


1 Answers

You can try the IIS Express launch profile within Visual Studio to run your application instead. Using this profile would not open a separate debugger console while running your application.

IIS Express launch profile

IIS Express is usually the default profile used when launching an app from Visual Studio. If not, you can create and configure a launch profile yourself.

The steps are detailed in the following articles:

  • Development and launchSettings.json
  • launchSettings.json & Debug Profile in ASP.NET Core
like image 121
Bhargavi Annadevara Avatar answered Jan 29 '26 13:01

Bhargavi Annadevara