I can't kill MyApp.vshost.exe

ぃ、小莉子 提交于 2019-11-27 19:57:34

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.

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.

habakuk

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).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!