Where is the Visual Studio layout saved?

2019-06-24 06:54发布

I am having problems with VS2008 moving the windows around and losing tabs when I close it and open again, or when I go from coding to debugging and back. (Yes, I know that it is supposed to save different layouts for coding and debugging). I have tried exporting my settings, but it informs me helpfully that

"Your settings were exported, but there were some errors. Error 1: Some command bar settings were not exported correctly due to an internal error."

Importing them again gives a similar error, and doesn't solve the problem. Does anyone know where VS saves the layout info? Or how to reinitialise the layout, without changing all my other settings? Thanks!

6条回答
你好瞎i
2楼-- · 2019-06-24 07:25

You might want to try Window > Reset Window Layout. This will reset the windows the way they were configured the last time you imported a layout.

查看更多
Explosion°爆炸
3楼-- · 2019-06-24 07:27

It sounds like you might have a permissions problem trying to export the files.

Another possibility that's a little less likely is that your *.suo files are being versioned, and so when you update your projects your layout for that project is updated as well.

查看更多
成全新的幸福
4楼-- · 2019-06-24 07:32

Some of the layout information is stored in the registry for the current user.

HKCU:\Software\Microsoft\VisualStudio\9.0

If you're really having a lot of problems you can take the desparate step of deleting or renaming this key. Personally, I would rename it, start VS and see if that fixed my import export settings problem.

查看更多
虎瘦雄心在
5楼-- · 2019-06-24 07:44
  • Export your current settings. Don't choose to export the layout settings.
  • Reset IDE settings to your favorite
  • Import your exported settings
查看更多
萌系小妹纸
6楼-- · 2019-06-24 07:48

This is what you're after:

Tools > Import & export settings

You will need to make it work though. Maybe manually saving it from My Documents\Visual Studio 2008\Settings

查看更多
做个烂人
7楼-- · 2019-06-24 07:49

As far as the export bug goes this seems to be a longstanding bug in VS, they can't seem to fix it. When you export your settings uncheck the check box for menu and command bar. That seems to be the one that usually is throwing the error. Then you will at least have almost everything backed up, before you reset all your settings.

查看更多
登录 后发表回答