Visual Studio忘记了窗口设置并弄得一团糟 [英] Visual studio forgets window settings and makes a mess

查看:132
本文介绍了Visual Studio忘记了窗口设置并弄得一团糟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在打开Visual Studio时遇到了这个问题,内部窗口分散在各处.他们都没有停靠;一些本应可见的东西已经变得不可见,反之亦然.然后,我不得不花很多时间才能将窗户重新放回我喜欢的位置.

这似乎仅在某些解决方案中发生,并且直到最近才出现.

我一生无法解决这个问题.还有其他人经历过这个吗?

解决方案

听起来好像Visual Studio在往返之间保留您的设置以及一般来说可能是Visual Studio设置配置文件时肯定存在问题.

我建议的解决方案是首先重置所有设置,其次根据自己的喜好自定义设置,最后备份这些自定义设置.想法是,此设置备份文件可在以后用于自动将快速设置恢复到您满意的程度.以下步骤显示了如何执行此操作,希望甚至可以解决最困惑的Visual Studio设置问题:

  1. 关闭所有Visual Studio实例.

  2. 转到开始">程序">"Visual Studio 200X">"Visual Studio工具">,然后选择"Visual Studio 200X命令提示符"

  3. 运行不太知名的'devenv.exe/ResetUserData'命令.使用此命令,您将丢失所有的Visual Studio环境设置和自定义设置.因此,/ResetUserData开关不受官方支持,并且Microsoft不会对其进行宣传(在命令提示符下键入devenv.exe/?时获得的devenv.exe帮助中未描述该开关).重要的是,请等待由此产生的devenv.exe进程从任务管理器甚至更好的Process Explorer中消失.

  4. 当进程从任务管理器或Process Explorer中消失时,运行"devenv.exe/ResetSettings",这将还原IDE的默认设置,并最终启动Visual Studio的单个实例.

  5. 现在,在Visual Studio中,选择工具"菜单底部附近的导入和导出设置..."以启动导入和导出设置向导.

  6. 选择重置所有设置"单选按钮,然后单击下一步">选择否,仅重置设置,覆盖我的当前设置",然后选择下一步">选择个人的设置集合"首选项,我将在此处选择Visual C#开发设置. (注意:您在此处选择的内容会影响键盘快捷键等,但是您可以始终重复此过程直到满意为止),然后单击完成".

  7. 当您收到消息您的设置已成功重置为XXXXXX开发设置"时.单击关闭,然后花大量时间向Visual Studio添加任何个人自定义设置,例如打开您一直希望打开的窗口,自定义工具栏并添加任何工具栏按钮等.

  8. 完成个人定制并完全满意您的设置后,请再次转到工具">导入和导出设置..."

  9. 选择导出选定的环境设置"单选按钮,然后单击下一步">选中所有设置",然后单击下一步">选择文件名和目录,然后单击完成"将当前设置的备份存储在.vssettings文件中./p>

  10. 如果将来再次遇到麻烦,请回到工具">导入和导出设置...",这一次选择导入所选环境设置"单选按钮,然后单击下一步",选择否,仅导入新设置" ,覆盖我的当前设置",然后单击下一步>从列表(通常在我的设置"文件夹下)中选择.vssettings文件的名称,或浏览到保存文件的位置,然后单击下一步>选中所有设置",然后单击完成

  11. 重要的是,关闭Visual Studio的单个实例.您将来打开的任何实例都应保留最新的自定义设置.

I have this problem where I open Visual Studio and the internal windows are scattered all over the place. None of them are docked; some that should be visible have become invisible and vice versa. I then have to spend ages getting the windows back where I like them.

It only seems to happen with some solutions and only appeared recently.

For the life of me I can't fix the problem. Has anyone else been through this?

解决方案

Sounds like there is definitely a problem with Visual Studio retaining your settings between round-trips and possibly your Visual Studio settings profile in general.

The solution I'd recommend is firstly to reset all settings, secondly customize things to your personal preference and finally take a backup of those customized settings. The idea is that this settings backup file can be used later to automate a quick settings restore to a point you are happy with. The following steps show how to do this and hopefully should sort out even the most confused Visual Studio setting issues:

  1. Close down all instances of Visual Studio.

  2. Go to Start > Programs > Visual Studio 200X > Visual Studio Tools > and choose 'Visual Studio 200X Command Prompt'

  3. Run the sligthly less well known 'devenv.exe /ResetUserData' command. With this command you will lose all of your Visual Studio environment settings and customizations. Because of this, the /ResetUserData switch is not officially supported and Microsoft does not advertise it (the switch is not described in the help for devenv.exe you get when you type devenv.exe /? in a command prompt). Importantly, wait for the resulting devenv.exe process to disappear from Task Manager or even better Process Explorer.

  4. When the process disappears from Task Manager or Process Explorer, run 'devenv.exe /ResetSettings' which will restore the IDE's default settings and eventually start a single instance of Visual Studio.

  5. Now in Visual Studio choose 'Import and Export Settings...' near the bottom of the 'Tools' menu to start the Import and Export Settings Wizard.

  6. Choose 'Reset all settings' radio button and Next > Choose 'No, just reset settings, overwriting my current settings' and Next > Choose your personal 'Settings Collection' preference, I would choose Visual C# Development Settings here (Note: What you choose here has an effect on keyboard shortcuts etc. but you can always repeat this process until happy) and click Finish.

  7. When you get the message that 'Your settings were successfully reset to XXXXXX Development Settings.' click Close then spend a good bit of time adding any personal customizations to Visual Studio such as opening windows you always want open, customizing toolbars and adding any toolbar buttons etc.

  8. When you are finished with your personal customization and completely happy with your setup go again to Tools > 'Import and Export Settings...'

  9. Choose 'Export selected environment settings' radio button and Next > Tick 'All Settings' and Next > Choose a file name and directory and click Finish to store a backup of your current settings in a .vssettings file.

  10. In future if things go haywire again head back to Tools > 'Import and Export Settings...' and this time choose 'Import selected environment settings' radio button and Next > Choose 'No, just import new settings, overwriting my current settings' and Next > Either choose the name of your .vssettings file from the list (usually under the My Settings folder) or Browse.. to where you saved the file and Next > Tick 'All Settings' and click Finish.

  11. Importantly, close the single instance of Visual Studio. Any future instance you open should retain your latest customizations.

这篇关于Visual Studio忘记了窗口设置并弄得一团糟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆