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
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).
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.
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.
I was able to kill my persistent vshost process by following these steps (VS2010):
That was it, the process stopped, and there was no need to restart Visual Studio.