Freigeben über


Did you know… How to remove items from the Recent Projects and Recent Files menus? - #371

Update: i’ve fixed the registry key for the recent files. ironically in my VS Tips talk today in Denmark, in the handout, i had a typo in the handout where I put "Recent" instead "Project" for the project MRU.

Have you ever deleted or renamed a project, only to accidentally try to reopen it through the Recent Projects menu or in the Start Page? Visual Studio is quick to point out to you that the project is unavailable via the following message box:

projects couldn't be loaded message box

Okay, that’s great, but why doesn’t VS then remove the project from the list, so you don’t keep accidentally selecting this project in the future? Instead VS moves it up to the top of the list, because it is the most recently visited project (because projects in an unavailable state still count.)

This is because Visual Studio is really tracking the project through the solution file. If the solution is valid, but the project is not, VS treats it as a recently visited project. However, if the solution does not exist, then VS asks you whether you want to remove it from the list:

solution couldn't be loaded

Getting back to today’s tip, how do you fix the first case, where the project doesn’t exist but the solution does?

Note: This involves modifying your registry settings. Only do so if you are comfortable and at your own risk.

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\ProjectMRUList

You’ll see the list of all the recently visited projects. Simply delete any one to have it removed from the list. This will remove it from the File –> Recent Projects and the Start Page Recent Projects. Note you will need to restart VS.

And the same “solution” (no pun intended) goes for Recent Files:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\FileMRUList

Technorati Tags: VS2005Tip,VS2008Tip

Comments

  • Anonymous
    December 03, 2008
    Shouldn't that be ...FileMRUList ?

  • Anonymous
    December 04, 2008
    Thanks for the tip.  I just wish MS would have thought about this a long time ago so I don't have to keep tweaking my registry.  Seem's pretty obvious.

  • Anonymous
    December 04, 2008
    Josh Beach has written a nice little tool to manage the "Recent projects" list in Visual Studio. An updated version can be had at http://www.codeproject.com/KB/cs/vsprojectlisteditor.aspx. A scripted version I wrote in tcl/tk can be found at http://wiki.tcl.tk/21314.

  • Anonymous
    December 04, 2008
    There's another way to do this, but it might actually be more distruptive... Create 24 different ConsoleApplications. Open them as needed to clear a project from the list. Create 24 different files. Open them as needed to clear a file from the list. Why 24? It's the highest number you can set the most-recently-used lists to. Now, I never said this is a better way, just another way. :)

  • Anonymous
    December 04, 2008
    The comment has been removed

  • Anonymous
    December 05, 2008
    here is how I do it in powershell. http://techsoda.wordpress.com/2007/08/24/powershell-to-clear-out-visual-studio-mru-list/

  • Anonymous
    December 07, 2008
    Great Post! I am from Brazil and also have a blog of. NET I will add your link there Very Helpfull

  • Anonymous
    December 07, 2008
    Visual Studio - Removendo Recent Projects

  • Anonymous
    December 12, 2008
    @Matt Poland: Wrong. I just did it with VS open. I closed and restarted it and everything I removed was gone.

  • Anonymous
    April 19, 2009
    本篇包括tip371-tip380http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-37.html#371、从...