Visual-studio – View Code / Designer Missing in VS 2008


Very often when working on an ASP.NET web site, the options View Code and View Designer will be missing from the content menu in the code window, as well as missing from the View menu. They are only available in the context menu in Solution Explorer.

This happens when debugging and when not debugging. Anyone know what could be causing this?

Best Solution

They threaded lots of stuff in VS2008 to try to improve the user experience. One of the things they threaded was the environment "deciding" that your ASPX file has a code-behind, or vice versa. I believe the thread has a low priority, or even waits for computer idle.

I think that's the gist of it. When you encounter this, don't do anything with your computer for a quick couple seconds, then right-click again and the option should be in the menu at that point. It's just that quick pause that makes VS think it can steal some "idle" time or whatever. I was very aggravated by this a few weeks ago when I got a new computer at work and was getting this with every file I opened. I googled it a bit and came up with the above. Hasn't really been an issue lately, not sure why.