views:

65

answers:

1

I am working on a project using VS 2008, containing MANY files within projects within solutions. We recently had to convert all our work from VS 2003 to 2008 (you know how big companies are always the last to convert to the lastest version of stuff).

In trying a "Find in Files" (or "Quick Find") within 1 solution containing 3 projects, I am successful in my search within all 3 projects only when using "Current Doc" & "All Open Docs". But when using "Entire Solution" or "Current Project" only 2 of the 3 projects give me correct results. The Find will not show files within 1 project in particular that I KNOW include results from my Find.

After reading suggestions from: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=105511

I attempted every Workaround they had, and NONE worked for me. Any suggestions???

A: 

Setting find options

First try the following:

  • Ctrl+Shift+F (Find In Files)
  • Look in: Entire Solution
  • Expand Find Options
    • Whatever for Match case
    • Whatever for Match whole word
    • Uncheck "Use:"
    • Look at these file types: *.*

"Dealing" with some rare solution hierarchy issues

Next, if you have your projects organized into solution folders (as in you have this instead of this), try expanding each of the projects one time, as follows:

  • foreach solution folder in the project
    • expand the solution folder
    • foreach project in the solution folder
      •  expand the project node
      •  (optional) collapse the project node
    • (optional) collapse the solution folder

Additional details regarding expanding the projects: in my work on my Solution File List tool pane (in particular the Find in Solution Explorer feature shown), I found that sometimes files aren't found in the solution if the project hasn't been expanded once. Using the automation model, the problem always occurs, but using the lower level COM interfaces is more likely to work. The lower level interfaces are what Visual Studio uses internally, so most of the time people won't run into this problem. I use a lot of carefully ordered operations (aka hacks) to keep it working as much as possible, but every once in a while I still have to expand a folder before a file is found.

If all else fails

I'll need to know as much of the following as you can provide. These are relevant for all projects in the solution, not just the ones that aren't working for the Find in Files. For some Visual Studio operations, an exception will interrupt the remainder of the operation, so an exception while operating on project A might keep the find from reaching project B, etc.

  • What project types do you have in the solution? Especially if you are using 3rd party project types such as VS.Php (I think .phpproj) or nFringe (.ucproj). As a quick check, you can right click each of those projects and select Unload Project, then try the Find In Files afterwards.
  • What source control system are you using?
  • Do you have any 3rd-party add-ins installed? (Microsoft ones count if they are power toys, etc.)
  • Do you have any non-file-system files in the project? (Nodes in the project that don't map directly to a file on the hard drive.)
  • Does any project in the solution reference files on the network?
280Z28