I've looked around online to try to find a way to delete the history of VS 2010's Find/Replace feature, but all I've gotten are answers only valid for previous versions (VS 05, VS 08, etc.). Does anyone know how clear it for the 2010 version? Thanks!
You can find and replace text in the Visual Studio editor by using Find and Replace (Ctrl+F or Ctrl+H) or Find/Replace in Files (Ctrl+Shift+F or Ctrl+Shift+H). You can also find and replace only some instances of a pattern by using multi-caret selection.
An easier solution and safer then using the registry to remove individual projects is to rename the . sln file. In VS 2008, click on the project. You will be prompted that it can no longer be found and do you want to remove it from the list.
To remove a single project from Recent Projects list you can right click on the project and select remove. (The screenshot is in Italian, but it's clear.) Have to restart visual studio to get it removed from the file -> recent project list.
Open regedit.exe
, go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Find
. Remove all keys that starts with Find
and Replace
, like Find1
, Find2
, Replace1
, etc. You can remove history for Find
only or Replace
only, or remove only particular Find
, if you want to.
HKEY_CURRENT_USER
user is for user that is currently logged in.
If you need to clear history for another user, you need to go to HKEY_USERS\{UserId}\Software\Microsoft\VisualStudio\10.0\Find
For example HKEY_USERS\S-1-5-21-2705333110-2095705488-3072420928-1000\Software\Microsoft\VisualStudio\10.0\Find
.
[EDIT]
Step-by-step:
Make a quick console application:
using Microsoft.Win32; public static void Main() { var findKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\VisualStudio\10.0\Find", true); findKey.GetValueNames() .Where(arg => Regex.IsMatch(arg, @"^Find( \d+)?$")) .ToList() .ForEach(findKey.DeleteValue); }
Compile it and close VS.
Keep in mind that VS caches this Find
and Replace
lists. It persists the lists to the registry when you close VS. So if you clean the list and then restart VS, you will see no effect, because VS restored the list on the shutdown. So you need to close VS, clear the list, open VS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With