views:

336

answers:

8

This is a very petty question that I'm only asking while compiling... ;)

For some reason my VS 2008 IDE doesn't remember my window preferences when I close & reopen - it resets the window widths, locations, appearances etc.

Where's the secret switch so that my IDE stays looking the way I want it?

A: 

There is none. Loosing windows size an position has always been an illness of Windows. VS on its own is not free from it.

There is more: There are settings & preferences in VS, and you can export them for future use. The options for export miss some settings. There has been two years already, they haven't fixed it still.

User
Shaul
Not really. It's just something is suddenly broken in windows or in VS and there is no way to find out what. The only option is to reinstall everything hoping it will be better afterwards.
User
Let me chime in as a guy on VS team: Windows behavior has nothing to do with VS toolwindows, because they aren't top-level windows. They are controls hosted inside VS, and VS takes full responsibility for managing their width/height, and specifically for saving it.
Pavel Minaev
A: 

Do you have more than one instance of VS 2008 open? The settings of the last closed instance will overwrite the ones saved before.

Stevo3000
nope, that's not it.
Shaul
A: 

This happened to me after installing certain plugins. Maybe try to disable your plugins and see if it still happens?

Apart from that, VS itself did not cause any trouble in this aspect for me. Of course, you have to exit VS in the intended way and let it have enough time to save it's settings. Crashing or killing VS in some way naturally prevent this, but I'm sure you knew that already.

Are the symptoms always visible, or is it rather randomly?

Update

Are only window settings affected, and other settings can still be changed without problem? Are you sure you still have write access where needed? Does it work if you switch over to a different user account (with admin privileges)?

mafutrct
Nah, even if I disable my add-ins it still happens. Always.
Shaul
See my comment to @demoncodemonkey above.
Shaul
A: 

Does the initial VS screen come up, asking for an "environment" type? What operating system do you run VS on? More details would probably help to provide some hints...

No, it doesn't ask for environment type. I'm on WinXP SP3.
Shaul
+3  A: 

The window positions are stored in the following file:

%APPDATA%\Application Data\Microsoft\VisualStudio\9.0\windows.prf

I'm guessing that you don't have write access to this file, or something.

Anyway if you can somehow delete this file, it will regenerate it when you next start up your VS, with the windows in their default positions.

demoncodemonkey
OK, we're on the trail here. Turns out the only things that are not working properly are the windows docked to the side of the IDE; their widths are not being saved. Everything is saving correctly.
Shaul
Is it any toolwindow you dock onto left/right edge, or only specific ones?
Pavel Minaev
A: 

I just had this very problem, and more or less followed demoncodes advice. Went to

%AppData\Roaming\Microsoft\VisualStudio\9.0Exp\UserSettings

and removed the file windows.prf and backup_windows.prf (made a copy of it first of course.) Seems to have fixed my problems at least.

Skurmedel
+1  A: 

Try resetting the Visual Studio

Tools->Import and Export Settings->Reset All Settings

Or

devenv.exe /resetsettings
NightCoder
+1 and answer credit: I logged a support call with Microsoft at http://connect.microsoft.com, and they advised me to do exactly this... and it worked!
Shaul
A: 

I've been struggling with this issue too. Every time I open VS2008 then my output window, task list, error window are all full size and not docked at the bottom. I've saved my .vssettings file to a new location which I have given All rights to. This did not solve the problem with my windows size and placement. Probably due to what someone said about that data being saved in the .prf files at:

%APPDATA%\Application Data\Microsoft\VisualStudio\9.0\windows.prf 

I only want the default behavior for those windows -- docked at the bottom.

So, then under the VStudio 2008 Windows-->> menu item, I find:

Reset Window Layout

I click that and the windows are all set properly. However, after I close and re-open VStudio 2008 then all my other preferences are saved: External Tool Items, Custom toolbars, custom buttons on toolbars But, the window locations are not ever correct. I am resolved to clicking the :

Reset Window Layout

But, this is a really annoying bug in VSTudio 2008.

daylight