C# Visual Studio F6 停止工作。它不再构建项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/682494/
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-08-04 13:14:47  来源:igfitidea点击:

Visual Studio F6 stopped working. It no longer builds the project

c#.netvisual-studiovisual-studio-2008keyboard-shortcuts

提问by BFree

I'm using VS2008, been using it for quite some time now, and since I hate using the mouse while developing, I'm always using F6to build the solution, or Shift+F6 to build the current project. What's weird though is for some strange reason, it simply stopped working over the last few days. In fact, when I pull down the Build menu, next to "Build MyProject" there's no longer a "Shift+F6" shortcut there on the menu?!? Anyone ever experienced this? Is there a setting I need to change?

我正在使用 VS2008,现在已经使用了很长一段时间,因为我讨厌在开发时使用鼠标,所以我总是使用F6来构建解决方案,或者Shift+F6 来构建当前项目。奇怪的是,出于某种奇怪的原因,它在过去几天中只是停止了工作。事实上,当我拉下 Build 菜单时,菜单上的“Build MyProject”旁边不再有“ Shift+ F6”快捷方式?!?有没有人经历过这种情况?是否有我需要更改的设置?

采纳答案by bdukes

You can change keyboard bindings in the Tools->Options dialog. It's under Environment->Keyboard.

您可以在“工具”->“选项”对话框中更改键盘绑定。它在环境->键盘下。

You can reset the binding here, and also check what might have stolen it by checking what's currently bound to those keys.

您可以在此处重置绑定,还可以通过检查当前绑定到这些密钥的内容来检查可能窃取了它的内容。

If you recently installed any add-ins, they're known to set (sometimes unwanted) keyboard shortcuts.

如果您最近安装了任何加载项,就会知道它们会设置(有时是不需要的)键盘快捷键。

回答by Anand Shah

Have you tried : Tools -> Options -> Environment -> Keyboard

您是否尝试过:工具 -> 选项 -> 环境 -> 键盘

All the keyboard shortcuts have been shown there.

所有的键盘快捷键都显示在那里。

回答by Joel Coehoorn

I'll add the proverbial "Is it plugged into the wall" question:

我将添加众所周知的“它是否插在墙上”问题:

Do you have a fancy keyboard that replaces function keys with other things toggled incorrectly?

你有一个用其他不正确切换的东西替换功能键的花式键盘吗?

回答by Paul Johnson

VMWare stole my Shift+ F6. Maybe that's your prob?

VMWare 偷走了我的Shift+ F6. 也许那是你的问题?

I fixed this by going to going to tool-options-environment-keyboard just like the other suggestions but I clicked "Reset" instead to restore the proper short cuts.

我通过转到工具选项环境键盘来解决此问题,就像其他建议一样,但我单击“重置”来恢复正确的快捷方式。

回答by Rahul

Your Keyboard Mapping Scheme has changed. Go to Tools -> Options. In Environments->Keyboard in the dropdown for "Apply the following additional mapping scheme" select "Visual C# 2005"

您的键盘映射方案已更改。转到工具 -> 选项。在“应用以下附加映射方案”下拉菜单中的“环境”->“键盘”中,选择“Visual C# 2005”

回答by WebDever

I know this question already has an answer but it is good to have this here for future reference:

我知道这个问题已经有了答案,但最好将其放在这里以供将来参考:

On the Solution properties page, Configuration Properties -> Configuration, the list of projects will be displayed and the last column "Build" will have checkboxes, one for each project. If they are all unchecked, you will press F6 but nothing will happen. Check the projects you want to build, on that case and you are now good to hit F6.

在解决方案属性页面上,配置属性 -> 配置,将显示项目列表,最后一列“构建”将有复选框,每个项目一个。如果它们都未选中,您将按 F6 但什么也不会发生。检查您要构建的项目,在这种情况下,您现在可以按 F6。

回答by JDPeckham

Resharper was annoying about this. I had to set BuildSolution to f6 then remove F6 from Resharper_Move

Resharper 对此很恼火。我必须将 BuildSolution 设置为 f6 然后从 Resharper_Move 中删除 F6

回答by KenD

Just in case this bites anyone else: Parallels Desktopfor OS X grabs F6and uses it for "Show and hide Parallels Desktop". It can be disabled in Preferences -> OS X System Shortcuts

以防万一这会影响其他人:适用于 OS X 的Parallels Desktop抓取F6并使用它来“显示和隐藏 Parallels Desktop”。可以在 Preferences -> OS X System Shortcuts 中禁用它