Вопрос

There is a similar question here on SO, but I have a fairly small solution and I do launch the debugger from within VS. My understanding is that using the Enable the Visual Studio Hosting process checkbox has several advantages so I'd like to keep it checked.

The problem is I will just do a Build Solution and sometimes the MyApp.vshost.exe launches. Then the next time I do a build, the build fails because the .exe is in use and can't be replaced. I then have to Launch Task Manager and manually kill the process (or go the file directory and manually delete the file). Of course now I always leave Task Manager running to save that step.

This never used to happen in VS2008, does anyone know what causes the vshost.exe to launch on a build? I have been extremely careful and have used the Build menu as opposed to the shortcut keys just to make sure I don't hit F5. It also doesn't happen every time but does happen reasonably frequently.

Update

I turned off the checkbox for the visual studio hosting process. When I Debug, exit and rebuild I still see this problem, only now there is no processes listed in the TaskManager. The only solution is to delete the .exe file on disk in the Debug folder and then rebuild. However, the problem happens every time even without running the debugger. That is after every build (without debugging) I have to delete the .exe

I do have Resharper, AnkhSVN, NuGet and NDepend (disabled) installed.

Это было полезно?

Решение

I was also having the same problem. I found a solution that resolved these errors. You need to set the CPU to x86 in the debugging menu. Next to the Debug button on the toolbar, there is a drop-down box that lists Any CPU. Hope so it will usefull to you and resolve your problem.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top