4

In earlier versions of Visual Studio, you could change the way that results from Find are presented by altering the value of HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{VSVersion}\Find\Find result format. In particular, I would set it to $f$e($l): $t\\r\\n which removes the full path from the entry.

Making the same change to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0\Find\Find result format doesn't seem to do anything. Is there another way to address this in VS2017?

jakop
  • 87
  • 7

1 Answers1

4

VS 2017 now uses private registry (see Where does Visual Studio 2017 RC store its config?). One way to access it directly is from a running Visual Studio 2017 instance with my Visual Commander extension. For example, you can use the following C# command:

public class C : VisualCommanderExt.ICommand
{
    public void Run(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package) 
    {
        var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(
            @"Software\Microsoft\VisualStudio\" + DTE.Version + @"\Find");
        key.SetValue("Find result format", @"$f$e($l): $t\r\n");
    }
}
Community
  • 1
  • 1
Sergey Vlasov
  • 26,641
  • 3
  • 64
  • 66