visual-studio 如何真正重置 Visual Studio 窗口布局?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26863/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I REALLY reset the Visual Studio window layout?
提问by TimK
I had a plugin installed in Visual Studio 2008, and it created some extra dockable windows. I have uninstalled it, and I can't get rid of the windows it created - I close them, but they always come back. They're just empty windows now, since the plugin is no longer present, but nothing I've tried gets rid of them. I've tried:
我在 Visual Studio 2008 中安装了一个插件,它创建了一些额外的可停靠窗口。我已经卸载了它,我无法摆脱它创建的窗口 - 我关闭它们,但它们总是回来。它们现在只是空窗口,因为插件不再存在,但我没有尝试过摆脱它们。我试过了:
- Window -> Reset Window Layout
- Deleting the .suo files in my project directories
- Deleting the Visual Studio 9.0 folder in my Application Settings directory
- 窗口 -> 重置窗口布局
- 删除我的项目目录中的 .suo 文件
- 删除我的应用程序设置目录中的 Visual Studio 9.0 文件夹
Any ideas?
有任何想法吗?
回答by Bryan Roth
Have you tried this? In Visual Studio go to Tools> Import and Export Settings> Reset all settings
你试过这个吗?在 Visual Studio 中,转到工具>导入和导出设置>重置所有设置
Be sure you back upyour settings before you do this. I made the mistake of trying this to fix an issue and didn't realize it would undo all my appearance settings and toolbars as well. Took a lot of time to get back to the way I like things.
在执行此操作之前,请确保备份您的设置。我犯了一个错误,试图用它来解决一个问题,但没有意识到它也会撤消我所有的外观设置和工具栏。花了很多时间才回到我喜欢的东西。
回答by Aidan Ryan
Try devenv.exe /resetuserdata. I think it's more aggressive than the Tools > Import and Export options suggested.
尝试devenv.exe /resetuserdata。我认为它比建议的工具 > 导入和导出选项更具侵略性。
Also check Tools > Add In Managerand make sure there aren't any orphans there.
还要检查工具 > 添加在管理器中并确保那里没有任何孤儿。
回答by Vin
How about running the following from command line,
如何从命令行运行以下命令,
Devenv.exe /ResetSettings
You could also save those settings in to a file, like so,
你也可以将这些设置保存到一个文件中,像这样,
Devenv.exe /ResetSettings "C:\My Files\MySettings.vssettings"
The /ResetSettings switch, Restores Visual Studio default settings. Optionally resets the settings to the specified .vssettings file.
/ResetSettings 开关,恢复 Visual Studio 默认设置。(可选)将设置重置为指定的 .vssettings 文件。
回答by Hammad Khan
I had similar problem except that it happened without installing any plugin. I begin to get this dialog about source control every time I open the project + tons of windows popping up and floating which I had to close one by one.
我遇到了类似的问题,只是没有安装任何插件就发生了。每次打开项目时,我都开始收到有关源代码控制的对话框 + 大量弹出和浮动的窗口,我不得不一一关闭。


Windows -> Rest Windows Layout, fixed it for me without any problems. It does bring the default setting which I don't mind at all :)
Windows -> Rest Windows Layout,为我修复它没有任何问题。它确实带来了我根本不介意的默认设置:)
回答by LordLiverpool
If you have an old backup copy of CurrentSettings.vssettings, you can try restoring it.
如果您有 CurrentSettings.vssettings 的旧备份副本,您可以尝试恢复它。
I had a completely corrupted Visual Studio layout. When I tried to enter debug, I was told that VS had become unstable. When I restarted, my window layout would then be totally screwed. I tried restoring the VS current user settings in the registry from a backup, but that didn't help. However, restoring CurrentSettings.vssettings seems to have cured it.
我有一个完全损坏的 Visual Studio 布局。当我尝试进入调试时,我被告知 VS 变得不稳定。当我重新启动时,我的窗口布局将完全被搞砸。我尝试从备份中恢复注册表中的 VS 当前用户设置,但这没有帮助。但是,恢复 CurrentSettings.vssettings 似乎已经治愈了它。
There seems to be a bunch of binary stuff in there and I can imagine it gets irretrievably corrupted sometimes.
那里似乎有一堆二进制的东西,我可以想象它有时会不可挽回地损坏。
回答by yossharel
Note: if you have vs2010 and vs2008 and you want to reset the 2008, you will need to specify in command line the whole path. like this:
注意:如果你有 vs2010 和 vs2008 并且你想重置 2008,你需要在命令行中指定整个路径。像这样:
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /resetsettings
If you don't specify the path (like devenv.exe /resetsettings), it will reset the latest version of Visual studio installed on your computer.
如果您不指定路径(如devenv.exe /resetsettings),它将重置您计算机上安装的最新版本的 Visual Studio。
回答by LeopardSkinPillBoxHat
I close them, but they always come back
我关闭它们,但它们总是回来
When you say "they always come back" do you mean "next time you restart Visual Studio" or "immediately"?
当您说“他们总是回来”时,您的意思是“下次您重新启动 Visual Studio”还是“立即”?
One quirk of Visual Studio (at least VS2005) is that settings aren't saved until you exit. That means that if VS crashes at all while you are using it, any layout changes you made will be lost. The way around this is to always gracefully exitwhen you have set up everything like you want it to be.
Visual Studio(至少是 VS2005)的一个怪癖是在您退出之前不会保存设置。这意味着如果 VS 在您使用时完全崩溃,您所做的任何布局更改都将丢失。解决此问题的方法是在您按照自己的意愿设置好所有内容后始终优雅地退出。
Not sure if this will help your particular situation though.
不确定这是否会帮助您的特定情况。
回答by TimK
I tried most of the suggestions, and none of them worked. I didn't get a chance to try /resetuserdata. Finally I reinstalled the plugin and uninstalled it again, and the windows went away.
我尝试了大部分建议,但没有一个奏效。我没有机会尝试 /resetuserdata。最后我重新安装插件并再次卸载它,Windows消失了。
回答by hscoder
If you want to reset your development environment of your visual studio, then you can use Import and Export setting wizard. see this for all steps:
如果您想重置您的 Visual Studio 的开发环境,那么您可以使用导入和导出设置向导。查看所有步骤:
回答by Chris Conway
If you've ever backed up your settings (Tools -> Import and Export Settings), you can restore the settings file to get back to a prior state. This is the only thing that I've found to work.
如果您曾经备份过您的设置(工具 -> 导入和导出设置),您可以恢复设置文件以恢复到之前的状态。这是我发现唯一可行的方法。

