I’ve gotten used to manually starting IISExpress instead of using [F5] in Visual Studio 2010 to start a debugging session. Whenever I need to do server-side debugging, I manually attach Visual Studio’s debugger to the IISExpress.exe process (Tools/Attach to Process…/Available Processes/IISExpress.exe/Attach). I just personally find this to be more efficient; it seems to facilitate a faster test/debug cycle (I also use FireFox’s FireBug for client-side debugging instead of Visual Studio, but that’s another post all together).
I recently had to slick my development laptop and reinstall Windows 7 Ultimate and all my development tools. When I had everything installed again, everything was running smoothly… until I tried to manually attach Visual Studio 2010 to the IISExpress.exe process. I got this very (non) informative error message:
And it also killed the IISExpress.exe process at the same time (Visual Studio: “If I can’t attach to it, NOONE WILL!!! MOO HA HA HA!”).
Of course, my first response was to dive head-first into Google (Google, how do I love thee, let me count the search results…). The general consensus seemed to be that I should manually run a 64-bit version of the Visual Studio Remote Debugging Monitor. Well, I never had to do that before I slicked and reinstalled my machine… I’d rather not accept that answer.
After more time spent wading around in Google’s search results, it occurred to me that I had never (since the slick & reinstall) actually just hit F5 to let Visual Studio start the debugger and attach to the process itself. So I did, fully expecting the same error. Low and behold, it started the debugger and attached to the IISExpress.exe process with no problems [shock]. I stopped the debugging session, manually started IISExpress, manually attached Visual Studio to the IISExpress.exe process… and it worked.
Apparently Visual Studio needed to do some “super-secret internal configuration” the first time IT started the debugger and attached to IISExpress to make it work. Once it did that, then manually attaching to IISExpress works like a champ!
Pretty much my situation except I didn’t re-install anything, it just stopped working. This solution fixed it. Thanks!
Glad my post was able to help you! 🙂
Goto project Options and change CPU kind to x86