﻿# 使用 Visual Studio 以來遇過最詭異的問題：無法搜尋檔案

幾個星期前我遇到一件很詭異的事，就是在我的 Visual Studio 2008 專案中執行「在檔案中尋找」功能(Find in Files, Ctrl+Shift+F)會找不到任何檔案，在「搜尋結果(Find Results 1)」視窗中顯示的錯誤訊息如下：（中文版的訊息應該是 "[找不到要查詢的檔案](http://msdn.microsoft.com/zh-tw/library/z613zk0e\(VS.80\).aspx)。" 吧）

```
Find all "a", Subfolders, Find Results 1, "Entire Solution", "*.*"
No files were found to look in.
  Find was stopped in progress.
```

不過，這問題很怪，並非所有專案都會遇到此問題，有些專案可以搜尋，但有些則不行，且發生的時機點也很不一定，有時後重新開機後就可以搜尋了。

雖然發生的頻率很低，但是最近在開發的一個專案因為時常需要搜尋檔案內容，且重開機後再開也無法搜尋，因此就用錯誤訊息上 [Google 搜尋](http://www.google.com/search?hl=zh-TW&esrch=BetaShortcuts&q=%22No+files+were+found+to+look+in%22&lr=)，找到了一些國外的資料（還好我用英文版的 Visual Studio 比較可以查相關資源）。

解決的方法更是詭異，只要按下一個不知道哪裡生出來的快速鍵就可以正常搜尋了：**Ctrl + Scroll Lock**

我按下 Ctrl + Scroll Lock 鍵後真的將神奇的搜尋功能回覆了，讓我不得不佩服國外那些部落客，這種官方完全沒有文件的情況下，誰會想的到要按下 Ctrl + Scroll Lock 鍵解決這個問題啊！

另外提及，從國外的文章看來，此問題從 Visual Studio .NET 2003 就開始有的，到如今我的 Visual Studio 2008 with Service Pack 1 還是會發生，真的是一件十分詭異的事。

**相關連結**

-   ["No files were found to look in.Find was stopped in progress." in VS 2003](http://bloggingabout.net/blogs/edward/archive/2005/01/31/2136.aspx)
-   [No files were found to look in. VS.NET 2005](http://khsw.blogspot.com/2007/03/no-files-were-found-to-look-in-vsnet.html)
-   [How To Solve: "No Files Were Found To Look In. Find Was Stopped In Progress"](<              http://www.dev102.com/2008/09/04/how-to-solve-no-files-were-found-to-look-in-find-was-stopped-in-progress/>)
-   [Strangest error: No files were found to look in. Find was stopped in progress.](https://web.archive.org/web/20160323061556/http://vidmar.net/weblog/archive/2007/04/17/Strangest-error-No-files-were-found-to-look-in.-Find.aspx)
-   ["Find in files" says : "No files were found to look in.Find was stopped"](http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=105511)
-   ["Find in files" says : "No files were found to look in.Find was stopped" - 因應措施](http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=105511)
