Click here to Skip to main content
13,352,298 members (73,756 online)
Click here to Skip to main content
Add your own
alternative version


48 bookmarked
Posted 2 Oct 2009

Find File in Solution

, 28 Mar 2010
Rate this:
Please Sign up or sign in to vote.
Find any file in solution using incremental search and advanced filtering

Main Window

Find File in Solution main window



Finding a file in a big solution may be a hard and daunting task. It is especially true when the solution contains tens of projects organized in complex hierarchy. Unfortunately, Visual Studio IDE doesn't provide a convenient way to find an arbitrary file in the solution. Find File in Solution AddIn solves this annoying problem.


Installation of Find File in Solution AddIn is very simple: just copy the binary files in one of the predefined folders where Visual Studio looks for add-ins. This article explains the matter in great details: INFO: Default .AddIn file locations for Visual Studio add-ins. I personally prefer the following path:

  • Windows XP: "C:\Documents and Settings\<username>\<mydocuments>\Visual Studio 2005\AddIns" (2008 for Visual Studio 2008)
  • Windows Vista/7: "C:\Users\<username>\Documents\Visual Studio 2005\AddIns" (2008 for Visual Studio 2008)

Note for Visual Studio 2005 users: Open SlnFileFind.AddIn file with Notepad and change HostApplication/Version nodes value to 8.0:

<Extensibility xmlns="">
        <Name>Microsoft Visual Studio</Name>

When the files are copied to a folder, restart Visual Studio to reload its add-ins.

Visual Studio Command "open (of)" - Almost Right

Actually, VS IDE allows to open an arbitrary file without spelunking into solution projects. It is done with wonderful "Find" combo box located on the Standard toolbar. Ctrl+D shortcut brings keyboard focus to the combo. Then, just type '>' symbol (without quotes) to enter the universe of VS IDE internal commands. The command that opens a file is, well, open (or short alias: of). After the command name, you just start typing a filename and drop-down list will show the available files:

VS IDE `of' command

VS IDE `of' command in action

Unfortunately, there is one fundamental flaw in this feature: you must know the filename beforehand and you must type it exactly how it starts. Otherwise, of command won't find anything. This limitation makes the of command practically useless.

Using Find File in Solution

Well, usage is very straightforward and simple. Open the Find File in Solution main window either from main menu or by hitting Ctrl+Alt+Y shortcut and start typing a filename.

Find File in Solution menu

Find File in Solution menu

When you are satisfied with the search result, then press TAB or DOWN ARROW key to select files. You may select several files by holding SHIFT key or using CTRL key and mouse. File selection works exactly as in a regular Windows Explorer window. Press ENTER to open selected files or ESC to dismiss the dialog.

The Find File in Solution main window is a regular Visual Studio tool window. It means that it can be floating, docked to either side or autohidden as any other IDE window. Using Ctrl+Alt+Y shortcut or selecting Find File in Solution item from the main menu will always bring keyboard focus to the search box.

Note: Upon solution opening Find File in Solution starts scanning solution tree for files. It happens in a separate worker thread rather than in the main IDE thread in order to preserve IDE responsiveness. That's why if the solution is very big, then Find File in Solution may show empty window for several seconds immediately after the solution is opened. It is normal behavior. Regardless of that, you can start typing the search string right away. When all files are fully loaded, Find File in Solution main window will be populated with correct results. It takes a huge solution to see this effect, though.

Following are the examples of possible search patterns.

Simple Search

Simple Search

Typing a string in the search box brings all files that contain this string in their filename.

Multiple Search

Multiple Search

Typing multiple substrings brings all files that contain all of the substrings in their filename.

Excluding Files From Search

Negative Match

Prepend substrings with hyphen to exclude matching files from search results.

Searching by Full Path

By default Find File in Solution searches by filename. You may search by full path by starting search string with backslash. It may be useful for finding only those files that belong to a certain directory.

Search by path

Sorting Results

Sorting Results

Search results can be sorted by clicking on column header.

Tweaking Find File in Solution

Tweaking is not recommended for ordinary users but sometimes it may be useful for a user with special needs or extremely fast/slow typing person. The secret of Find File in Solution responsiveness and smooth unstrained work is that the search is not performed immediately as user types a search string. There is a small delay before the search kicks in. It is indistinguishable for humans but significant for a machine, so it can spare redundant CPU load.

In order to show tweak settings, type "settings" string (without quotes) in search box and press Ctrl+Enter.


Default delay value is 300 msec. Minimal value is 0 msec, maximal is 1000 msec.


  • 3rd October, 2009
    • Initial version
  • 12th October, 2009
    • Bug fix: If user tries to open a file that exists in a project but is deleted from disk, then FileNotFound exception is not caught and IDE crashes.
  • 24th October, 2009
    • Rare crash that happens during file search has been fixed
    • Performance has been improved
    • Files that belong to multiple projects will have "(Multiple projects)" string in Project column in the file list. Also, file's tool-tip for such items will list all projects that the file belongs to.
  • 5th December, 2009
    • After user opens selected files add-in's window closes only if it is in floating mode. For all other modes "Find File in Solution" window will stay opened.
    • When "Find File in Solution" is invoked, its search box is initialized with currently selected text in VSE IDE from document windows, Output pane, etc.
    • "Find File in Solution" monitors solution changes (add/remove/rename files and projects).
    • Tweak dialog has additional option - rescanning solution files on demand. Some users reported that occasionally "Find File in Solution" loses its file list. This option should remedy the problem until proper fix is found.
  • 9th December, 2009
    • Bug fix: No files are listed in add-in's window when some of the projects in solution failed to load
  • 27th February, 2010
    • Bug fix: If a file appears directly under solution folder, i.e. doesn't belong to any project, then this file is not listed in search results
  • 27th March, 2010
    • Bug fixed: Sometimes internal list of files gets out of sync with GUI. It may lead to an unhandled exception in VS IDE
    • Improved: On solution/project events only relevant cases are handled


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Alex Blekhman
Software Developer
Australia Australia
More than ten years of C++ native development, and counting.

Smile | :)

You may also be interested in...


Comments and Discussions

GeneralRe: Opending a file by pressing "Enter" or double clicking on a file closes the addin Pin
Sergey Rybalkin10-Jan-10 6:47
memberSergey Rybalkin10-Jan-10 6:47 
GeneralRe: Opending a file by pressing "Enter" or double clicking on a file closes the addin Pin
Alex Blekhman10-Jan-10 21:37
memberAlex Blekhman10-Jan-10 21:37 
GeneralTool crashes often Pin
aliascodeproject5-Oct-09 22:49
memberaliascodeproject5-Oct-09 22:49 
GeneralRe: Tool crashes often Pin
Alex Blekhman6-Oct-09 0:56
memberAlex Blekhman6-Oct-09 0:56 
GeneralRe: Tool crashes often Pin
aliascodeproject6-Oct-09 2:55
memberaliascodeproject6-Oct-09 2:55 
GeneralRe: Tool crashes often Pin
Alex Blekhman6-Oct-09 4:06
memberAlex Blekhman6-Oct-09 4:06 
GeneralRe: Tool crashes often Pin
aliascodeproject6-Oct-09 22:17
memberaliascodeproject6-Oct-09 22:17 
GeneralRe: Tool crashes often Pin
Alex Blekhman6-Oct-09 22:37
memberAlex Blekhman6-Oct-09 22:37 
I have exactly the same version. Also, several of my colleagues work with this add-in without any problem whatsoever. Do you have this dump file? I am very interested in looking at it.
GeneralRe: Tool crashes often Pin
aliascodeproject7-Oct-09 3:46
memberaliascodeproject7-Oct-09 3:46 
GeneralRe: Tool crashes often Pin
Alex Blekhman7-Oct-09 4:21
memberAlex Blekhman7-Oct-09 4:21 
GeneralNice... Pin
Paul Selormey3-Oct-09 3:12
memberPaul Selormey3-Oct-09 3:12 
GeneralRe: Nice... [modified] Pin
Alex Blekhman3-Oct-09 3:36
memberAlex Blekhman3-Oct-09 3:36 
GeneralRe: Nice... Pin
Paul Selormey3-Oct-09 4:54
memberPaul Selormey3-Oct-09 4:54 
GeneralRe: Nice... Pin
Alex Blekhman3-Oct-09 5:18
memberAlex Blekhman3-Oct-09 5:18 
GeneralRe: Nice... Pin
Paul Selormey3-Oct-09 5:37
memberPaul Selormey3-Oct-09 5:37 
GeneralRe: Nice... Pin
Alex Blekhman3-Oct-09 6:28
memberAlex Blekhman3-Oct-09 6:28 
GeneralRe: Nice... Pin
Paul Selormey3-Oct-09 6:42
memberPaul Selormey3-Oct-09 6:42 
GeneralRe: Nice... Pin
Alex Blekhman3-Oct-09 7:00
memberAlex Blekhman3-Oct-09 7:00 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180111.1 | Last Updated 28 Mar 2010
Article Copyright 2009 by Alex Blekhman
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid