core icon indicating copy to clipboard operation
core copied to clipboard

Visual studio 2017 can not stop dotnet.exe

Open SharafiAli opened this issue 8 years ago • 9 comments

Visual studio 2017 can not stop dotnet.exe

Visual studio is unable to stop dotnet.exe process.

General

After migration of 3 dotnet core projects from dotnet core 1 to 2.0, Visual Studio cannot stop dotnet.exe processes after stopping the debugging. The solution contains 3 dotnet core projects (Identity server, Api and Web application).

Visual studio shows the popup window "Stop Debugging in Progress..." with the message: "Debugging is being stopped but is not yet complete. You can force debugging to stop immediately, but any processes being detached may be terminated instead. this window will automatically close when the debugging has completely stopped." but it can not stop the dotnet.exe process.

Even the "End Process" on the Processes-Tab can not terminate the dotnet.exe process, it gives an AccessDenied warning.

Even the command "taskkill /pid ProcessID /f" cannot terminate it. It returns "The process with PID ProcessID could not be terminated." Error, with "This task is not running currently" as reason.

The only possible solution that I have at this moment is restarting my pc, which makes the development impossible.

Does anyone have any idea why this is happening?

SharafiAli avatar Dec 13 '17 09:12 SharafiAli

PTAL @Andrew-MSFT

richlander avatar Dec 15 '17 06:12 richlander

Looping in @caslan

AndrewBrianHall avatar Dec 15 '17 06:12 AndrewBrianHall

I have vaguely the same problem since upgrading to Visual Studio 2017.5.2. About 1 time out of 3 I have to kill the IIS Worker Process manually. Never experienced this before.

olivierr91 avatar Dec 18 '17 20:12 olivierr91

@WardenGnaw, can you help investigate?

caslan avatar Dec 18 '17 21:12 caslan

@SharafiAli I tried to reproduce this issue with a solution with two web apps and a dotnet console app. I can successfully start, run, and stop the debugging session. All of the dotnet and iisexpress processes are gone.

Do you have a project that you can share that reproduces this issue?

WardenGnaw avatar Dec 19 '17 20:12 WardenGnaw

I'm having this problem with a dotnet core angular spa app from the template. It happens about half the time. I have to kill the dotnet.exe process to get a compile.

GeekyMonkey avatar Feb 19 '18 18:02 GeekyMonkey

Un-checking this fixed it for me Tools - Options - Debugging - General - "Enable JavaScript Debugging for ASP.NET (Chrome and IE)"

GeekyMonkey avatar Feb 20 '18 08:02 GeekyMonkey

Deleting all breakpoints and running in Debug mode fixed it. Unfortunately, nothing else did it for me. I had to again set the breakpoints that I wanted.

ramvdixit avatar Mar 07 '18 13:03 ramvdixit

Issue moved to dotnet/project-system #3394 via ZenHub

Petermarcu avatar Mar 16 '18 04:03 Petermarcu