Visual Studio 2010 annoyingly opens documents in wrong MDI pane

Visual Studio-2010Mdi

Visual Studio-2010 Problem Overview


Visual Studio's MDI is currently causing me a lot of frustration. Here is my basic layout:

+--------------+---+
|              |   |
|      1       |   |
|              |   |
|              | 3 |
+--------------+   |
|      2       |   |
+--------------+---+

Pretty standard - I have my open files in area 1, my errors window in area 2, and my solution explorer in area 3.

The main source of my frustration is that when I double click to open a file from the solution explorer, it will usually open in area 1 where it should, but SOMETIMES (seemingly at random) it will open in area 2, meaning I have to drag it up to area 1 to see it properly. Or, more rarely, it might even open in a completely new pane between areas 1 and 3.

Further, if I close all my files, area 2 will expand to take up the whole left column, and new files will open in this new combined pane, which again is annoying. Or, they maybe not, depending on what mood VS is in today.

No one else in our office of 20 seems to have this problem, but similarly no one seems to know how to fix it. So:

  1. I want to make it so files I open always open into area 1.
  2. I wonder if it is possible to be able to "lock" my layout (eg. like I can with the Windows Task Bar), to stop me from accidentally moving or resizing panes.

Visual Studio-2010 Solutions


Solution 1 - Visual Studio-2010

Did you perhaps use the "New Horizontal Tab Group" command to split #1 into #1 and #2, then move your errors window into that?

I would just try resetting the window layout and see if that fixes it.

  1. First, Window -> Close All Documents
  2. Then, Window -> Reset Window Layout
  3. Exit VS to be sure, then go back in.

Solution 2 - Visual Studio-2010

Another solution - avoiding "Reset Layout" - is to reposition the windows in "area 2" (usually breakpoints/watch/debug-output) making sure you drag them to the circled "bottom-most" of the dockpositions (if you move it to the one crossed out in the below image, it'll open code-files in the wrong location).

visual studio window docking locations

Alternatively, at the very bottom of the screen there is another dock-position, but that one will cause area #2 to be stretched through the entire bottom of the screen (stealing some space from area #3).

Fix is instant & no need to restart Visual Studio.

Solution 3 - Visual Studio-2010

I have this problem too.

I tried Josh's solution, and it worked. Actually it might be even simpler, it might be enough to just do Window -> Reset Window layout. But I can't test that since I don't know how the wrong behaviour started.

If Josh's solution does not work for you, someone at Microsoft support recommended to reset all settings ( Tools-> Import and Export setting... -> Reset all settings (see http://connect.microsoft.com/VisualStudio/feedback/details/635796/files-open-up-in-the-wrong-docking-window).

I did not want to do that because I didn't want to use all my settings - and it turned out to not be necessary.

Solution 4 - Visual Studio-2010

I had the same problem with Visual Studio. Plus my explorer window kept disappearing all the time and had to go to view and launch both properties and explorer window again.

Solution:

  1. Go to Window Then Reset layout.
  2. Organize your workstation the way you want as far as properties, toolbar/toolbox and explorer window.
  3. Go back to window Then save Layout.

This will allow you to go back to the layout that you prefer every time things move around. Hope this helps. Happy coding.

Solution 5 - Visual Studio-2010

I had the same problem with Visual Studio 2019.

The confirm, the solution that worked for me was to follow both Josh's answer and kalmiya's answer:

  1. Window -> Close All Documents
  2. Window -> Reset Window Layout
  3. Press Ctrl + Shift + F, to find some text in your solution
  4. Drag the 'Find window' to the bottom-most dock position (see diagram in kalmiya's answer)
  5. Restart Visual Studio

If you want to reproduce the problem, simply drag the 'Find window' to the second-from-bottom dock position.

Many thanks for the previous answers!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMike ChamberlainView Question on Stackoverflow
Solution 1 - Visual Studio-2010JoshView Answer on Stackoverflow
Solution 2 - Visual Studio-2010kalmiyaView Answer on Stackoverflow
Solution 3 - Visual Studio-2010T.J.KjaerView Answer on Stackoverflow
Solution 4 - Visual Studio-2010NelsonRobertsView Answer on Stackoverflow
Solution 5 - Visual Studio-2010Jimmy FView Answer on Stackoverflow