Quick Fix: “Find in Files” Button is Disabled

Okay, so this is a pretty simple one.  Perhaps I should have figured it out way, way faster than I did, and perhaps nobody else will ever have trouble with this, but I never promised to be helpful.  Or did I?

Anyway, here’s a pretty common scenario (around here, at least):

  1. Fire up Visual Studio 2010.
  2. Hit CTRL + SHIFT + F to bring up the Find and Replace dialog in “Find In Files” mode.
  3. Type a keyword that will bring up the area in your project you want to work with.
  4. Hit Enter.
  5. Wait.
  6. Finally notice that nothing is happening.
  7. Hit Enter again.
  8. And again.
  9. Mumble “What the hell…?”
  10. Reach for your mouse.
  11. Notice the “Final All” button is disabled.
  12. Say “What the hell?” a bit louder.
  13. Click the button anyway.  (Nothing happens.)
  14. Stare at monitor with angry / confused expression.

image

Here’s the problem: in Visual Studio 2010, the “Find All” button isn’t enabled until you’ve opened a text file of some description.  Once this happens, it will stay enabled until you close Visual Studio, even if you don’t have any documents open.  Yeah, it’s a bug.

Here’s a workaround:

  1. Open any text document (code file, XML file, whatever).
  2. Hit CTRL + SHIFT + F to re-open the Find and Replace dialog.

If you’re looking for a quick keyboard fix, try CTRL + N, ENTER, CTRL + SHIFT + F, CTRL + F4.

And please, if this helps you, leave a comment and let me know.  I’d really like to hear that I’m not the only person this bothers.

14 comments:

  1. Thanks for this post! It minimised the time I spent in phase 14 :). Most appreciated!

    Jean

    ReplyDelete
  2. I had the TFS Explorer as the open tab in Visual Studio and was trying to do a search in the whole solution but lo and behold, the button was disabled. Thanks for pointing this out. I just had to switch to another tab that had code in it and the button became enabled.

    How stupid is this *feature* ?!?!

    ReplyDelete
  3. I was more WTF than WTH. Googled "VS Find and Replace buttons disabled" and this was on top. Thanks for the save!

    ReplyDelete
  4. Thank you very much. It saved me time.

    ReplyDelete
  5. Gracias. Un-freakin'-believable!

    ReplyDelete
  6. I was baffled! Thanks for this post. In my case, it goes back to being disabled if I close the file. So, there must always be a text file open.

    ReplyDelete
  7. I posted this as a bug on Microsoft Connect. Please vote it up so it gets fixed.

    https://connect.microsoft.com/VisualStudio/feedback/details/678013/the-find-all-button-in-the-find-and-replace-dialog-is-disabled-unless-there-is-a-text-file-open

    ReplyDelete
  8. This is a duplicate of #622037, which was closed as 'Won't Fix'. See that issue for full details, including a very helpful explanation by Chris Dias (Program Manager, Visual Studio).

    https://connect.microsoft.com/VisualStudio/feedback/details/622037/

    ReplyDelete
  9. Seems like an old bug - the same thing happens in Visual Studio 2008 too. Thanks Paul for the link to Chris Dias's response. Not sure why they can't just mark it as low priority rather than "won't fix" - but if their team's like some I've worked on those do amount to much the same thing...

    ReplyDelete
  10. I have the same issue and new about the open a file to fix, but I wanted a better solution. There is a better workaround in the 2nd link above:

    Just press the drop down of the 'Look in:' box and reselect 'Entire Solution' (even though it was already selected). The 'Find All' button is now enabled!!

    ReplyDelete
    Replies
    1. I was coming to the comments to make this point as well, so +1 to it. Happened a long while, but it went away 'randomly' until I realized that what I needed to do was manipulate the 'Look In' dropdown selection.

      Delete
  11. Thanks for the fix, what an annoying bug!

    ReplyDelete
  12. يمكن أن تسبب الأخطاء والأخطاء غير المرغوب فيها في منزلك أو مكان عملك الكثير من التوتر للأشخاص المعنيين. إذا كنت ترغب في تجنب الاستعانة بأخصائي مكافحة الآفات في ميسا للتعامل مع الإصابة ، فستحتاج إلى منع الآفات من غزو مساحتك. يمكنك القيام بذلك بشكل عام عن طريق الحفاظ على نظافة البيئة وختم المناطق التي تجعل منزلك أو عملك متاحًا للآفات.شركة مكافحة حشرات
    شركة مكافحة النمل الابيض بالخبر
    شركة مكافحة حشرات بالخبر
    شركة رش مبيدات بالخبر

    ReplyDelete


Copyright © 2010 Paul Guenette and Matthew Sleno.