visual-studio “整个解决方案”的搜索停止工作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/892126/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:31:32  来源:igfitidea点击:

Search stops working for "Entire Solution"

visual-studio

提问by leora

Somehow Visual Studio search has stopped working for me. Anytime I search "Entire Solution" for some text I get this result:

不知何故,Visual Studio 搜索已停止对我来说有效。每当我在“整个解决方案”中搜索某些文本时,都会得到以下结果:

Find all "[Whatever I was searching for]", Subfolders, Find Results 1, "Entire Solution" No matching text found to look in. Find was stopped in progress.

查找所有“[我正在搜索的内容]”、子文件夹、查找结果 1、“整个解决方案” 找不到要查找的匹配文本。正在停止查找。

Why does it suddenly say "No files were found to look in"?

为什么突然说“没有找到要查找的文件”?

I've found a number of links on Google that say to press Ctrl+ Breakor Ctrl+ Scroll Lock, but none of them seem to work for me.

我在 Google 上找到了许多链接,说要按Ctrl+BreakCtrl+ Scroll Lock,但似乎没有一个对我有用。

回答by djcouchycouch

I get that problem once in a while. One seemingly nonsensical solution I've found is to click inside the Find Results window (not the Output window). Once the blinking text cursor is visible, hit Ctrl+Breakfour or five times. This seems to "unblock" whatever causes the problem.

我偶尔会遇到这个问题。我发现的一种看似荒谬的解决方案是在“查找结果”窗口(而不是“输出”窗口)内单击。一旦闪烁的文本光标可见,点击Ctrl+Break四到五次。这似乎可以“解除阻止”导致问题的任何原因。

There are reports Ctrl+ ScrLkmay need to be used instead of Ctrl+Break. If these doesn't work then try Breakalone.

有报告Ctrl+ScrLk可能需要用来代替 Ctrl+ Break。如果这些不起作用,那么Break单独尝试。

Note from Codeguard: I have found an explanation and deterministic solutionto this problem

来自 Codeguard 的注释:我找到了对此问题的解释和确定性解决方案

回答by Echelon_Force

Windows 7 Pro SP1 64-bit, Visual Studio 9.0.30729.1

Windows 7 专业版 SP1 64 位,Visual Studio 9.0.30729.1

Didn't Work:

没用:

  • Ctrl+ Break
  • Ctrl+ Scroll Lock
  • Restart of Visual Studio
  • Ctrl+ Break
  • Ctrl+ Scroll Lock
  • 重新启动 Visual Studio

Worked:

工作过:

  • Break(in Find Result 1 & 2) (only pressed once)
  • Break(在查找结果 1 和 2 中)(仅按一次)

Source: Comments in Gordon's link...

资料来源:戈登链接中的评论......

回答by Codeguard

Bug source

错误来源

This is neither Visual Studio nor Windows related bug. In fact, the bug is in your keyboard! Many keyboards from different vendors have been reported to be buggy.

这既不是 Visual Studio 也不是 Windows 相关的错误。事实上,问题出在你的键盘上!据报道,来自不同供应商的许多键盘都有缺陷。

Problem

问题

If you press Ctrl+Breakand release Ctrlfirst, then Break gets stuck on a buggy keyboard. If you ever pressed Ctrl+Breakthe "wrong" way, you will have this problem with search being interrupted.

如果您先按下Ctrl+Break并松开Ctrl,Break 就会卡在有问题的键盘上。如果你按下Ctrl+ Break“错”的方式,你将有这个问题,搜索被中断。

Details

细节

According to scan code specifications, Breakand Ctrl+Breakare special. They send "make" (press) AND "break" (release) scan codes the moment you press Break. They send nothing when you release Break. The buggy keyboard will send the following sequence:

根据扫码规范,BreakCtrl+Break是特殊的。他们会在您按下 的那一刻发送“make”(按下)和“break”(释放)扫描代码Break。当您释放时,它们什么也不发送Break。越野车键盘将发送以下序列:

  1. Ctrl"make" scan code
  2. Ctrl+Break"make" scan code
  3. Ctrl"break" scan code
  4. Pause"break" scan code
  1. Ctrl“制作”扫码
  2. Ctrl+ Break“制作”扫码
  3. Ctrl“破解”扫描码
  4. Pause“破解”扫描码

That is, Ctrl+Breakis never released, but instead Pauseis released.

也就是说,Ctrl+Break永远不会被释放,而是Pause被释放。

Reproduction

再生产

You could for example use old good Spy++ from Visual Studio tools. Attach it to anything, for example Windows notepad, and monitor messages (I suggest that you select only keyboard messages). Press Ctrl+Break, releasing Ctrlfirst. Check the output from Spy++. You will see the sequence I shown in Details section.

例如,您可以使用 Visual Studio 工具中的旧式 Spy++。将它附加到任何东西,例如 Windows 记事本,并监视消息(我建议您只选择键盘消息)。按Ctrl+ BreakCtrl先松开。检查 Spy++ 的输出。您将看到我在“详细信息”部分中显示的序列。

I have tried two different keyboards on the same computer. Logitech K120 has the bug while some other Mitsumi keyboard behaves according to specifications and does not have the bug.

我在同一台电脑上试过两种不同的键盘。罗技K120有这个bug,而其他一些Mitsumi键盘按照规格运行,没有这个bug。

If you think about it, it's easy to understand that correct behavior needs special case handling, while buggy behavior is naive. This is why many different keyboards can be buggy.

如果你仔细想想,很容易理解正确的行为需要特殊的案例处理,而错误的行为是幼稚的。这就是为什么许多不同的键盘可能有问题的原因。

Solution

解决方案

Replace your keyboard :)

更换您的键盘 :)

Workaround

解决方法

You simply need to press Ctrl+Break, paying attention to releasing Breakfirst. It doesn't matter which application is active.

你只需要按Ctrl+ Break,注意先释放Break。哪个应用程序处于活动状态并不重要。

回答by Gordon Mackie JoanMiro

This bug has been in Visual Studio a long time and it never seems to get fixed.

此错误已在 Visual Studio 中存在很长时间,而且似乎从未得到修复。

See this MS Connect item from 2004: http://connect.microsoft.com/VisualStudio/feedback/details/105511/find-in-files-says-no-files-were-found-to-look-in-find-was-stopped

请参阅 2004 年的 MS Connect 项目:http: //connect.microsoft.com/VisualStudio/feedback/details/105511/find-in-files-says-no-files-were-found-to-look-in-find-被阻止

I couldn't believe they still hadn't fixed it in VS2010 - but it's still there :(

我不敢相信他们仍然没有在 VS2010 中修复它 - 但它仍然存在:(

The Connect item has been marked as Closed - Won't Fix: https://connect.microsoft.com/VisualStudio/feedback/details/718217/find-was-stopped-in-progress-while-performing-search-in-visual-studio

Connect 项目已标记为Closed - Won't Fixhttps: //connect.microsoft.com/VisualStudio/feedback/details/718217/find-was-stopped-in-progress-while-performing-search-in-视觉工作室

回答by Alexander Garden

Ctrl+Breakor Ctrl+ScrLkcancel a find operation. Try it. What has happened is that some software layer (presumably Windows) thinks those keys are still being pressed even though they are not. Pressing and releasing them clears the flag.

Ctrl+BreakCtrl+ScrLk取消查找操作。试试看。发生的事情是一些软件层(大概是 Windows)认为这些键仍在被按下,即使它们没有被按下。按下并释放它们会清除标志。

It could be any of these combinations:

它可以是以下任何组合:

Ctrl+Break

Ctrl+Break

Alt+Break

Alt+Break

Break

Break

Ctrl+ScrLk

Ctrl+ScrLk

Remember that you have multiple control and alt keys on your keyboard-- try it with each of them. If it's the right Ctrlkey + ScrLk, pressing the left Ctrlis not going to resolve the issue.

请记住,您的键盘上有多个 control 和 alt 键- 尝试使用每个。如果是右键Ctrl+ ScrLk,按左键Ctrl不会解决问题。

Hereis the Connect issue which Microsoft closed as "Won't Fix".

是 Microsoft 关闭为“无法修复”的 Connect 问题。

If this is a recurring problem for you, there is a Visual Studio extensionthat suppresses the virtual key that causes the problem.

如果这对您来说是一个反复出现的问题,则有一个 Visual Studio 扩展可以抑制导致问题的虚拟键。

回答by Mahdi Alkhatib

Ctrl+ Fand Ctrl+ Shift+ Fhave stopped working on Visual Studio 2015 Community Edition.

Ctrl+FCtrl+ Shift+F已停止在 Visual Studio 2015 社区版上工作。

My friend told me going to:

我的朋友告诉我要去:

  1. Tools → Import and Export Settings:Enter image description here

  2. Choose: Reset all settings → NextEnter image description here

  3. Choose: No, just reset settings, overwriting my current settings → NextEnter image description here

  4. Choose: General → FinishEnter image description here

  1. 工具 → 导入和导出设置:在此处输入图片说明

  2. 选择:重置所有设置→下一步在此处输入图片说明

  3. 选择:不,只是重置设置,覆盖我当前的设置→下一步在此处输入图片说明

  4. 选择:常规→完成在此处输入图片说明

回答by user390978

I tried all the previous options. They didn't work for me, but reading them made me sure that this is a bug, and I will have to try some unknown ways to get it working. So, I tried a simple file searchin Visual Studio 2010 in:

我尝试了所有以前的选项。它们对我不起作用,但阅读它们使我确信这是一个错误,我将不得不尝试一些未知的方法来让它工作。所以,我在 Visual Studio 2010 中尝试了一个简单的文件搜索

  1. The current document
  2. All the open documents
  1. 当前文档
  2. 所有打开的文件

Both of which worked.

两者都有效。

Then I tried Find in Filesand woah! It started working.

然后我尝试在文件中查找,哇!它开始工作了。

回答by phil

In my case I had a bogus character in the "Look at these file types:" field in the search window.

就我而言,我在搜索窗口的“查看这些文件类型:”字段中有一个虚假字符。

Removing the character solved the problem.

删除字符解决了问题。

Visual Studio 2017

视觉工作室 2017

enter image description here

在此处输入图片说明

回答by Hammad Khan

Search solution in Visual Studio 2012 is broke. I tested this on three machines, did not work on two. What I found which does work is click on drop down arrow next to search field and select Find all. This is a bit of pain because you have to select drop down every time you search in solution.

Visual Studio 2012 中的搜索解决方案已损坏。我在三台机器上测试了这个,在两台机器上没有工作。我发现有效的是单击搜索字段旁边的下拉箭头,然后选择“查找全部”。这有点痛苦,因为每次搜索解决方案时都必须选择下拉菜单。

enter image description here

在此处输入图片说明

回答by Neil Weicher

Unfortunately none of these special key strokes work for me. Only restarting Visual Studio 2010 seems to work for me.

不幸的是,这些特殊的击键都不适合我。只有重新启动 Visual Studio 2010 似乎对我有用。