Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

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: ,
Posted: Thursday, December 04, 2008 3:00 AM by saraford

Comments

CC said:

Shouldn't that be ...\FileMRUList ?

# December 4, 2008 7:46 AM

Anonymous said:

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.

# December 4, 2008 9:44 AM

Keith Vetter said:

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.

# December 4, 2008 9:52 AM

Programmerman said:

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. :)

# December 4, 2008 10:16 AM

Matt Poland said:

You stated that you would have to restart VS after changing the registry.  The only caveat is that, I believe, VS writes those out the the registry every time it closes.  If you modify the registry while VS is open and then close VS, it will overwrite your manual modifications.  You can do all kinds of crazy things mith multiple Visual Studio instances (some opened before the change and some opened after the change) and watch the last-one-wins race conditions unfold.  To avoid that, I would have all instances of VS closed prior to modifying the registry on this tip.

# December 4, 2008 11:34 AM

Mark Kola said:

# December 5, 2008 11:39 AM

Marcelo Oliveira said:

Great Post!

I am from Brazil and also have a blog of. NET

I will add your link there

Very Helpfull

# December 7, 2008 1:34 PM

Marcelo Ramos said:

Visual Studio - Removendo Recent Projects

# December 7, 2008 1:38 PM

acidreflux said:

@Matt Poland: Wrong. I just did it with VS open. I closed and restarted it and everything I removed was gone.

# December 12, 2008 1:07 PM

xjb said:

# April 19, 2009 9:12 PM
New Comments to this post are disabled
Page view tracker