This happens to me when I open a folder in visual studio rather than a project or solution. The search feature may start searches in the "Current Solution" by default, but no solution/project is open.
On the search dialog, select "Look in: All Open Documents"