visual-studio Visual Studio 命令不起作用。ctrl + f5 不运行我的应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/913054/
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
Visual studio commands don't work. ctrl + f5 doesn't run my application
提问by ralphtheninja
I used to be able to build and run my console applications by hitting Ctrl+ F5in visual studio. This no longer works. I looked everywhere. Does anyone know how to re-enable this command?
我曾经能够通过在 Visual Studio 中点击Ctrl+来构建和运行我的控制台应用程序F5。这不再有效。我到处看。有谁知道如何重新启用此命令?
回答by ralphtheninja
Might be a ridiculous suggestion but does your keyboard have some kind of "F Lock" key? Happened to me after I got a new keyboard and accidentally hit it. Didn't even know it was there :)
可能是一个荒谬的建议,但您的键盘是否有某种“F Lock”键?在我得到一个新键盘并不小心碰到它后发生在我身上。甚至不知道它在那里:)
回答by stuartd
Before you trash allyour settings, consider just resetting the Keyboard preferences:
在丢弃所有设置之前,请考虑重置键盘首选项:
In Tools / Options / Environment / Keyboard there's a drop-down for your Keyboard scheme and next to it a Reset button. Make sure the mapping scheme is set to whatever you want then hit the Reset button.
在工具/选项/环境/键盘中有一个键盘方案的下拉菜单,旁边有一个重置按钮。确保映射方案设置为您想要的任何内容,然后点击重置按钮。
回答by stuartd
I have had a similar problem where some of my shortcuts (such as the Alt+Shift+F10 intellisense shortcut) stopped working...
我遇到了类似的问题,我的一些快捷方式(例如 Alt+Shift+F10 智能感知快捷方式)停止工作...
I fixed it by going to Tools -> Import and Export Settings -> Reset all settings.
我通过转到Tools -> Import and Export Settings -> Reset all settings修复了它。
I was able to reimport my saved settings after I had reset them also but only with out the broken short cuts!
在我重置它们之后,我也能够重新导入我保存的设置,但只有没有损坏的快捷方式!
Hope this helps!
希望这可以帮助!
回答by Larry
I had a similar question, and reading this thread led me to an answer which is similar to the f-Lock key answer. I'm using a new laptop, and re-introducing myself to programming. When the book said press Ctrl-F5 I did so and the only thing that happened was that my monitor got slightly dimmer, though it returned to normal brightness as soon as I clicked on a few other things. What I noticed after reading this thread is that this new-fangled keyboard has a blue Fn key, and all the function key names are printed in blue. In other words, to get the function key functionality you have to be holding down the blue Fn key when you tap the actual function key. So F5 becomes Fn-F5 and Ctrl-F5 becomes Ctrl-Fn-F5. This is on a Dell Inspiron 1564. This is not quite as egregious as a F-Lock key, so I hope I'll get used to it soon.
我有一个类似的问题,阅读这个帖子让我得到了一个类似于 f-Lock 键答案的答案。我正在使用一台新笔记本电脑,并重新向自己介绍编程。当书上说按 Ctrl-F5 时,我照做了,唯一发生的事情是我的显示器变暗了一点,尽管我一点击其他一些东西它就会恢复正常亮度。读完这个帖子后我注意到这个新式键盘有一个蓝色的 Fn 键,所有的功能键名称都是蓝色的。换句话说,要获得功能键功能,您必须在点击实际功能键时按住蓝色 Fn 键。所以 F5 变成 Fn-F5,Ctrl-F5 变成 Ctrl-Fn-F5。这是在戴尔 Inspiron 1564 上。这不像 F-Lock 键那么严重,所以我希望我很快就会习惯它。
回答by hyeomans
I fixed this by pressing Fn + F5, this is right next to the Windows Button.
我通过按 Fn + F5 修复了这个问题,它就在 Windows 按钮旁边。
回答by hyeomans
One day it happened to me when I made some changes to the project and solution files in my ASP .NET project. When I opened it in Visual Studio, it allowed me to rebuild but not to run nor debug (the menu option didn't appear and the Ctrl+ F5didn't work).
有一天,当我对我的 ASP .NET 项目中的项目和解决方案文件进行了一些更改时,它发生在我身上。当我在 Visual Studio 中打开它时,它允许我重建但不能运行或调试(菜单选项没有出现并且Ctrl+F5不起作用)。
What I did to make it work again was right-click over the solution, into the Visual Studio "Solution Explorer" tree tab in the right, where all the files of your project appear, and select properties.
我所做的让它再次工作是右键单击解决方案,进入右侧的 Visual Studio“解决方案资源管理器”树选项卡,项目的所有文件都出现在其中,然后选择属性。
Then, select there a project, and put it as start project.
然后,在那里选择一个项目,并将其作为启动项目。
Perhaps this is your problem here. If not, I hope it can help someone in the future.
也许这是你的问题。如果没有,我希望它可以在将来对某人有所帮助。
回答by tomasofen
It happend to me something similar, but only with one project, and the others running right with CTRL + F5, so i will post here my problem and solution because it could help people searching for the same problem, as i was :)
它发生在我身上类似的事情,但只有一个项目,其他项目用 CTRL + F5 正确运行,所以我会在这里发布我的问题和解决方案,因为它可以帮助人们搜索同样的问题,就像我一样:)
I was opening in Visual Studio 2012 a solution created with Visual Studio 2013, and it didn't run with CTRL + F5. I open the solution file with notepad, and i change the following section:
我在 Visual Studio 2012 中打开了一个使用 Visual Studio 2013 创建的解决方案,但它没有使用 CTRL + F5 运行。我用记事本打开解决方案文件,并更改以下部分:
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
with this other:
与另一个:
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_x86|Any CPU = Debug_x86|Any CPU
Debug_x86|x86 = Debug_x86|x86
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
PruebaRelease|Any CPU = PruebaRelease|Any CPU
PruebaRelease|x86 = PruebaRelease|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
That solves the problem for me.
这为我解决了问题。
回答by Bruce Atkinson
This keyboard shortcut is set by default in os x, you need to disable it to use ctrl+F5. Have a look at http://www.daniellewis.me.uk/2015/07/01/ctrl-f5-not-working-in-a-windows-vm-running-on-parallels/to fix. I can run without debugging now in my VM.
这个键盘快捷键在 os x 中是默认设置的,你需要禁用它才能使用 ctrl+F5。看看http://www.daniellewis.me.uk/2015/07/01/ctrl-f5-not-working-in-a-windows-vm-running-on-parallels/来修复。我现在可以在我的 VM 中运行而无需调试。
回答by Phil Haselden
I had a similar problem with Alt+F7 (Find Usages in Resharper). Turns out the GeForce Experience was taking the shortcut for it's Sharing functionality. Uninstalled GE and all is good.
我在使用 Alt+F7(在 Resharper 中查找用法)时遇到了类似的问题。事实证明,GeForce Experience 正在为其共享功能走捷径。卸载了GE,一切都很好。
回答by Matthew Vines
Chances are you changed your default settings. Go to Tools->Import and Export Settings... Select 'Reset all', Click 'Next' and choose the 'Visual C# Development Settings' option.
您可能更改了默认设置。转到工具-> 导入和导出设置... 选择“全部重置”,单击“下一步”并选择“Visual C# 开发设置”选项。

