Visual Studio Search Error

Sometimes, when searching in Visual Studio (all version since 2003 at least) you get this message: No files were found to look in. Find was stopped in progress. It cannot find any match for the search criteria, even if there are thousands. And it displays that message immediately after pressing Search. You can search again…