Click here to Skip to main content
Click here to Skip to main content

VS Recent Project List Cleaner

, 21 Jan 2004
Rate this:
Please Sign up or sign in to vote.
How to clear Visual Studio .NET Recent Project List.

Sample Image

Introduction

This application was created to give me a way to easily clear some VS project items on VS Start Up page. This application simply explores the registry location where VS.NET stores Projects Lists. Also, the application will check if a project is still existing and mark it as [Broken Link] if it doesn't exist anymore showing that you can remove that project from the recent list.

Background

This application was built using Microsoft Visual Studio .NET 2003, maybe it doesn't list and clear projects list from previous versions of VS.NET. But you can easy update the code to handle another VS.NET registry location.

Using the code

The code also shows how to access the Windows registry and retrieve/delete/update values from/to it. The Registry.cs file is not mine, it can be in other author submissions here.

//This is the registry location for the VS.Net 2003 Recent list
public string RegistryValueKey = 
  @"Software\Microsoft\VisualStudio\7.1\ProjectMRUList";

Points of Interest

Some parts of this code were easy to migrate from my VB6 version utility.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Laudeci Oliveira
Web Developer
Brazil Brazil
No Biography provided

Comments and Discussions

 
Generalvs2005 support PinmemberHarm_Salomons3-Jan-07 20:25 
Generalsupports all Pinmemberpeterchen20-Jun-07 21:32 
GeneralRe: supports all PinmemberHarm Salomons22-Jun-07 5:25 
GeneralRe: supports all Pinmemberpeterchen22-Jun-07 12:33 
GeneralWorks Great!!! Pinmembernotjustmani7-Feb-06 7:13 
GeneralStudio 7.0 support PinmemberMaurice Beelen14-Jun-04 0:38 
Hi,
 
I was looking for this for 7.O so here are required patches to have support for Studio 7.0 also:
 
Registry.cs:OpenKey

// Modification: when not finding a key also return error
// Author: Maurice Beelen
if (null == currentKey)
{
bError = true;
strError.Append( "Unable to open the key " + registryKey + " " + key );
}
return bError == true? false: true;
}

 
Form1.cs

// Modification: Allow search for 7.0 and 7.1
// Author: Maurice Beelen
private string RegistryValueKey71 =@"Software\Microsoft\VisualStudio\7.1\ProjectMRUList";
private string RegistryValueKey70 =@"Software\Microsoft\VisualStudio\7.0\ProjectMRUList";
private string RegistryValueKeyUsed = "";
 
--->% part cut %<---- goto: ShowRegistryEntries
// Modification: when 7.1 not found, look for 7.0
// Author: Maurice Beelen
if (mReg.OpenKey("HKEY_CURRENT_USER",RegistryValueKey71,false))
{
RegistryValueKeyUsed = RegistryValueKey71;
}
else if (mReg.OpenKey("HKEY_CURRENT_USER",RegistryValueKey70,false))
{
RegistryValueKeyUsed = RegistryValueKey70;
}
 
--->>% part cut %<<---- goto: DeleteRegistryEntry private void DeleteRegistryEntry(string EntryName){

// Modification: use previously found key
// Author: Maurice Beelen
mReg.OpenKey("HKEY_CURRENT_USER",RegistryValueKeyUsed,true);
if (!mReg.DeleteKeyValue(EntryName)) {
MessageBox.Show (mReg.ErrorMessage);
}
mReg.Close(false);
}
 
private void UpdateRegistryEntry(string EntryName, string ValueName){
// Modification: use previously found key
// Author: Maurice Beelen
mReg.OpenKey("HKEY_CURRENT_USER",RegistryValueKeyUsed,true);
if (!mReg.SetValue( EntryName,ValueName)) {
MessageBox.Show (mReg.ErrorMessage);
}
mReg.Close(false);
}

GeneralRe: Studio 7.0 support PinmemberLaudeci Oliveira14-Jun-04 2:07 
GeneralExactly what I was looking for... Pinmemberbrucetp31-Mar-04 2:18 
GeneralA small enhancement Pinmemberdgroves30-Jan-04 6:27 
GeneralRe: A small enhancement PinmemberLaudeci Oliveira31-Jan-04 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.141022.1 | Last Updated 22 Jan 2004
Article Copyright 2004 by Laudeci Oliveira
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid