You receive a "Total occurrences found: 0" message when you use the Find in Files dialog box in Visual Studio .NET or Visual Studio 2005 (884465)
The information in this article applies to:
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
SYMPTOMSIn Microsoft Visual Studio .NET or in Microsoft Visual Studio 2005, when you perform a search by using the
Find in Files dialog box, you notice that the search process returns no
occurrences of your search phrase in the current document. The report in the
Find Results window appears similar to the following: Find all "Search Phrase",
Hidden, Block, Find Results 1, Current Document
Total occurrences
found: 0 Note Search Phrase is a placeholder for the
phrase that you are trying to locate in the document.CAUSEThis behavior occurs because the Find dialog box
uses block scope. The scope that is set in the Find dialog box also applies to the Find in Files dialog box.WORKAROUNDTo avoid this behavior, set the scope in the Find dialog box to Current document. To do this, follow these steps: - Start Visual Studio .NET or Visual Studio 2005.
- Create a Visual C# Windows Application project.
- Open the code view of the Form1.cs form.
- Position the pointer on the following function. This function is located inside the Form1 function.
InitializeComponent - On the Edit menu, point to Find
and Replace, and then click Find. The
Find dialog box appears.
- Under Search, select Current
document.
STATUS This
behavior is by design.REFERENCESFor more information about the Find dialog box and the Find in Files dialog box, visit the following Microsoft
Developer Network (MSDN) Web sites:
Modification Type: | Major | Last Reviewed: | 3/7/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbtshoot kbForms kbprb KB884465 kbAudDeveloper |
---|
|