visual-studio 如何在 Visual Studio 中清除 MRU 列表?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/82661/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 16:31:12  来源:igfitidea点击:

How do you clear your MRU list in Visual Studio?

visual-studioregistrymru

提问by Gordon Mackie JoanMiro

I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go?

我想清除起始页上的项目列表...我该怎么做?我知道我可以在注册表中找到它,但是是否有经过批准的路线?

回答by Dusty Campbell

There is an MSDN article herewhich suggests that you just move the projects to a new directory.

有一个MSDN文章在这里,这表明你只需动的项目,一个新的目录。

However, as you mentioned, the list of projects is kept in the registry under this key:

但是,正如您所提到的,项目列表保存在注册表中的此项下:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\<version>\ProjectMRUList

and the list of recent files is kept in this key:

最近的文件列表保存在这个键中:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\<version>\FILEMRUList

Note For Visual Studio 2015:
The location has changed. You can check out this answerfor details.

注意 对于 Visual Studio 2015:
位置已更改。您可以查看此答案以了解详细信息。

Some people have automated clearing this registry key with their own tools:
Visual Studio Most Recent Files Utility
Add-in for cleaning Visual Studio 2008 MRU Projects list

有些人使用自己的工具自动清除此注册表项:
Visual Studio 最近的文件实用程序插件
,用于清理 Visual Studio 2008 MRU 项目列表

回答by CoderHawk

PowerCommands for Visual Studio 2008

Visual Studio 2008 的 PowerCommands

Features

特征

  • Clear Recent File List
  • Clear Recent Project List
  • Clear All Panes
  • Copy Path
  • Email CodeSnippet
  • Insert Guid Attribute
  • Show All Files
  • Undo Close
  • Collapse Projects
  • Copy Class
  • Paste Class
  • Copy References
  • Paste References
  • Copy As Project Reference
  • Edit Project File
  • Open Containing Folder
  • Open Command Prompt
  • Unload Projects
  • Reload Projects
  • Remove and Sort Usings
  • Extract Constant
  • Transform Templates
  • Close All
  • 清除最近的文件列表
  • 清除最近的项目列表
  • 清除所有窗格
  • 复制路径
  • 电子邮件代码片段
  • 插入 Guid 属性
  • 显示所有文件
  • 撤消关闭
  • 收起项目
  • 复制类
  • 粘贴类
  • 复制参考
  • 粘贴参考
  • 复制为项目参考
  • 编辑项目文件
  • 打开包含文件夹
  • 打开命令提示符
  • 卸载项目
  • 重新加载项目
  • 删除和排序使用
  • 提取常数
  • 转换模板
  • 关闭所有

alt text

替代文字

回答by Charles Anderson

If you try opening up a project that can no longer be found, Visual Studio will prompt you for permission to remove it from the MRU list. So if you temporarily rename an appropriate top level folder to fake the projects' disappearance, you can get rid of the projects one by one.

如果您尝试打开一个无法再找到的项目,Visual Studio 将提示您授予将其从 MRU 列表中删除的权限。因此,如果您临时重命名适当的顶级文件夹以伪造项目的消失,则可以将项目一一删除。

回答by Heliac

In Visual Studio 2015 all the history lists (including search history, file MRU and project MRU) are now located at:

在 Visual Studio 2015 中,所有历史记录列表(包括搜索历史记录、文件 MRU 和项目 MRU)现在位于:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\MRUItems

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\MRUItems

You will see a different GUID folder for each list, and a sub-folder called Itemsin each of them. Find the Itemsfolder that contains the relevant list, and just delete its parent GUID folder.

您将看到每个列表的不同 GUID 文件夹,以及在每个列表中调用的子文件夹Items。找到Items包含相关列表的文件夹,然后删除其父 GUID 文件夹。

Visual Studio will re-create the GUID folder together with a new Itemschild folder, next time it wants to add something to the list again.

Visual Studio 将重新创建 GUID 文件夹和一个新的Items子文件夹,下次它想再次向列表中添加内容时。

回答by Heliac

I found the MRU editorfrom Code Projecta great tool for that. No problems with it, and it works on 2003, 2005, and 2008.

我发现Code Project 中MRU 编辑器是一个很好的工具。它没有问题,它适用于 2003、2005 和 2008。

回答by Metro Smurf

Note: This answer is specific to Visual Studio 2010.

注意:此答案特定于 Visual Studio 2010。

If you don't want to manually edit the registry, you can use PowerCommands for Visual Studio 2010.

如果不想手动编辑注册表,可以使用PowerCommands for Visual Studio 2010

PowerCommands 10.0 is a set of useful extensions for the Visual Studio 2010 adding additional functionality to various areas of the IDE.

PowerCommands 10.0 是 Visual Studio 2010 的一组有用扩展,为 IDE 的各个区域添加了附加功能。

The specific command for clearing the registry from the extension is:

从扩展中清除注册表的具体命令是:

Clear Recent Project ListThis command clears the Visual Studio recent project list. The Clear Recent Project List command brings up a Clear File dialog which allows any or all recent projects to be selected.

清除最近的项目列表此命令清除 Visual Studio 最近的项目列表。清除最近的项目列表命令会弹出一个清除文件对话框,允许选择任何或所有最近的项目。

The PowerCommands can be installed with the Visual Studio extension manager: Tools > Extension Manager > Online Gallery: search for PowerCommands for Visual Studio 2010.

PowerCommands 可以与 Visual Studio 扩展管理器一起安装:工具 > 扩展管理器 > 在线库:搜索PowerCommands for Visual Studio 2010

回答by user3505772

Try Recently Used Files: a free addin for Visual Studio that manages MRU files on a per-project basis: Supported for VS 2010, 2012, 2013.

试用最近使用的文件:Visual Studio 的免费插件,可在每个项目的基础上管理 MRU 文件:支持 VS 2010、2012、2013。

For Visual Studio 2012, 2013: http://visualstudiogallery.msdn.microsoft.com/a61cbd1d-b5a2-490b-a6bb-f0ea3ecf214a

对于 Visual Studio 2012、2013:http: //visualstudiogallery.msdn.microsoft.com/a61cbd1d-b5a2-490b-a6bb-f0ea3ecf214a

For Visual Studio 2010: http://visualstudiogallery.msdn.microsoft.com/45283881-5a62-4dc1-8ffb-4cbc02709947

对于 Visual Studio 2010:http: //visualstudiogallery.msdn.microsoft.com/45283881-5a62-4dc1-8ffb-4cbc02709947

回答by user3909793

For Visual Studio 2013: Open the Run dialog (Press Win + R) type: regedit navigate to: HKEY_CURRENT_USER > Software > Microsoft > VisualStudio click 12.0 then the files will show up on the right side. Look for the "LastLoadedSolution", right click then click Modify change the value to 0.

对于 Visual Studio 2013:打开运行对话框(按 Win + R)键入:regedit 导航到:HKEY_CURRENT_USER > Software > Microsoft > VisualStudio 单击 12.0 然后文件将显示在右侧。查找“LastLoadedSolution”,右键单击然后单击“修改”将值更改为 0。

This worked for me.

这对我有用。

回答by shjeff

I'm not sure if this solution has been posted somewhere here, but if you have VS 2013 Update 5 you can open start page, and right click project below "Recent" list, and choose "Remove from list". I don't know how about other VS versions, maybe this feature is available.

我不确定此解决方案是否已在此处发布,但如果您有 VS 2013 Update 5,您可以打开起始页,然后右键单击“最近”列表下方的项目,然后选择“从列表中删除”。不知道其他VS版本怎么样,可能有这个功能吧。

回答by Alex Konnen

I had this issue as applied to VS 2017 where you do not have any MRU items in the registry as in the previous versions. The solution was, on the other hand, simple: go to "Tools->Extensions and Updates" and install "Power Commands for Visual Studio". After they have been installed, your File menu will look as shown below.

我遇到了这个问题,适用于 VS 2017,其中注册表中没有任何 MRU 项目,就像以前的版本一样。另一方面,解决方案很简单:转到“工具->扩展和更新”并安装“Visual Studio 电源命令”。安装后,您的文件菜单将如下所示。

enter image description here

在此处输入图片说明

Just click the menu item to clear the project MRU.

只需单击菜单项即可清除项目 MRU。