How to save and restore layouts in Visual Studio 2015
In this post I am going to be talking about a new feature in Visual Studio 2015.
As a developer during the work, you may be working on different type of projects or different part of the same project which makes you constantly open and close different tool windows in Visual Studio. For example, when you are writing unit test, you may want to have Test Explorer, Test Runner windows (even some particular windows coming from third-party tools like Resharper & CodRush) open and when you switch to implementing something totally different, you may want to close some of the windows and open some other ones!
Another example would be when you are debugging a project, you may want to open some particular windows and change it back when you switch to the normal state. Opening, closing and adjusting the size of windows again and again during the day could be really annoying. Before Visual Studio 2015 there were some plugins which addressed this issue (we will talk about it later in this post) but fortunately finally there is an out of the box support in Visual Studio 2015.
As you see in the following image, under Windows menu in Visual Studio there are some new options.
Save Window Layout:
When you select this option, a new dialog will be open and ask you to enter a name for this current Layout.
Note that, if you enter the same name as a layout you have already saved, the new layout will be replaced over the old one.
Apply Window Layout:
If you pay close attention, you will see there is a sub menu for this menu option. Under this sub menu, you will see the list of the name of all the layouts you have already created. You just need to select one of them and then the current layout of Visual Studio will be changed to what you have selected.
Manage Window layouts:
By selecting this option, a new dialog will be open and you can delete layouts or change the order of them respected to the position of they appear under Apply Window Layout menu option.
Reset Window Layout:
Restores the layout to the default in Visual Studio.
What to do for earlier versions of Visual Studio?
If you are using earlier versions of Visual studio, there is a nice extension for Visual studio named Layouts O Rama. I have been using this extension for a while and really like it.
After installing this extension, two menu options will be added to the Tools menu of Visual studio.
As the names imply, Save Windows Layout is used to save the current layout and Layouts O Rama Window is used to select your preferred layout.