I can't kill MyApp.vshost.exe

vshost.exe

vshost.exe Problem Overview


I've managed to get myself in a state where I've no instances of devenv running, but still a MyApp.vshost.exe in the background (no visible windows or consoles).

I've tried TaskManager, ProcessExplorer and command line (taskkill /F /IM MyApp.vshost.exe), none of them complain, the command line even says 'PID 5824 stopped', but it's still there.

I know I can reboot, but I'd rather get to the bottom of this.

It doesn't look like it's this issue (http://support.microsoft.com/kb/982551), because I can reboot no problem (just have in fact, so won't be able to provide any further diagnostics, sorry).

EDIT

This is how I got into this pickle:

alt text

vshost.exe Solutions


Solution 1 - vshost.exe

I was able to kill my persistent vshost process by following these steps (VS2010):

  1. open the properties of my executable project
  2. in the "Debug" tab, uncheck "Enable the Visual Studio hosting process"
  3. save the project file

That was it, the process stopped, and there was no need to restart Visual Studio.

Solution 2 - vshost.exe

It seems to be the normal behaviour for this task. When you kill it the task is restarted. So i advice you to close Visual Studio, that closes the *.vshost.exe task.

Solution 3 - vshost.exe

I had the same problem while working on a project with .NET 2.0 as target framework. Temporary changing the target framework to .NET 4.0 client did the job for me.

However, Iam unsure how this is (is it?) related to the file lock issue.

Solution 4 - vshost.exe

Maybe that's the same problem as described in https://stackoverflow.com/a/1582747/254041 (pending I/O processes):

> The MSDN API ref says "TerminateProcess initiates termination and returns immediately. This stops execution of all threads within the process and requests cancellation of all pending I/O. The terminated process cannot exit until all pending I/O has been completed or canceled.". Which means so much as: your I/O can block this process (though I wonder how it can bring your process to 100%, I/O usually doesn't do that).

Categories

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBenjolView Question on Stackoverflow
Solution 1 - vshost.exeEat at JoesView Answer on Stackoverflow
Solution 2 - vshost.exeNicolasView Answer on Stackoverflow
Solution 3 - vshost.exebinary101010View Answer on Stackoverflow
Solution 4 - vshost.exehabakukView Answer on Stackoverflow