Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:58189, Visual Studio 2017 / 2019

Updated on: September 28, 2019

If you are running your Web API and MVC project in Visual Studio 2017 or Visual Studio 2019 and getting following error, then you can try the following quick solution

Error:

Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:58189, Visual Studio 2017 / 2019

Solution:

1. Close all the open instances of this project from all the browsers and try running your web api or mvc or asp.net project again, it should fix the above issue.

2. If above fix is not working, then after closing all the open browsers, close the Visual studio and all its instances from Task Manager and reopen it, and try running the project now.