问题
I don't know what I did to my VS2008 or IE9 on my laptop, but now when I start my web projects (in IE9. Works fine in FF and Chrome) using Start Without Debugging, Visual Studio will start IE on my default start page, and then if I close the window, VS opens yet another IE window of my default start page.
Some things I noticed is that:
- VS output window shows Building directory '/mySite/'. twice, and this is the hanging point when the 1st window opens (see 3rd bullet). Update: I guess the output window displaying "Building directory '/...../'" more than once is normal, as my projects on my work PC do the same and works fine. But it still hangs during the build process and usually at this point.
- It is only when I start without debugging. It doesn't happen if I "Start Debugging" or right click the page in the Solution Explorer and hit "View in Browser".
- VS starts the first window before it is finished building the project. It stops building about halfway through, hangs and opens the 1st window. Then when I close it, VS finishes building and opens the 2nd window.
- When the 1st page loads, if I give another window focus or navigate to another page in the site, IE will eventually finish building, the 1st window will remain, and the 2nd window does not show up.
- When the first window is open, Windows Task Manager shows two
iexplorer.exe
processes, although it is the only window, and when I close it, only one process goes away, then the 2nd window opens and the 2nd process comes back. Then when I close the 2nd window, both processes disappear. - Restarting VS or my laptop doesn't help.
I have search for this on SO and on google and couldn't find help for this specific problem. I could try resetting the VS settings, but I'd like to avoid doing that. Can anyone help me fix this before I go crazy?
回答1:
After searching all over past couple of days, I found this link which [Microsoft] suggested installing Service Pack 1 for VS2008. In the link, they don't explain what the problem was or how it was caused, but installing SP1 solved the problem!
My guess is that the problem lied in IE8/9's LCIE feature. Although the fix for that as suggested by several posts I've found didn't work for me: Turning off Protection Mode and/or adding a DWORD named TabProcGrowth
of value 0
in HKEY_LOCAL_MACHINE->SOFTWARE->MS->IE->MAIN
.
Anyway, my problem is solved and if anyone else comes across this, try installing SP1 for VS2008, and be sure to run the Service Pack Preparation Tool, if needed, beforehand.
来源:https://stackoverflow.com/questions/7942709/start-without-debugging-opens-ie-twice