简体   繁体   English

Visual Studio 2010中“清洁解决方案”的热键是什么?

[英]What is the hot key for “Clean Solution” in Visual Studio 2010?

For debug you have F5 , for build you have F6 , but what about Clean Solution? 对于调试你有F5 ,对于你有F6的构建,但是Clean Solution呢?

I have a database app and I have to clean solution before I debug or it will cache with previous data. 我有一个数据库应用程序,我必须在调试之前清理解决方案,否则它将使用以前的数据进行缓存。 A hot-key will make life easier. 热键将使生活更轻松。

The keyboard shortcut combinations are sometimes dependent upon the profile settings you chose when you first installed Visual Studio. 键盘快捷键组合有时取决于您第一次安装Visual Studio时选择的配置文件设置。 For example, you can customize the environment for a VB.NET programmer (which simulates previous versions of VB), for a C++ programmer (which simulates previous versions of Visual C++), or for a C# programmer (not really sure what that does). 例如,您可以为VB.NET程序员(模拟以前版本的VB),C ++程序员(模拟以前版本的Visual C ++)或C#程序员(不确定它是什么)自定义环境。 。

That being said, I don't think any of the default profiles set up a keyboard shortcut for "Clean Solution". 话虽如此,我认为没有任何默认配置文件为“Clean Solution”设置键盘快捷键。

However, it's easy to set one up yourself, if you use this feature frequently enough to justify having one: 但是,如果您经常使用此功能来证明拥有一个,则很容易自己设置一个:

  1. From the "Tools" menu, select "Options". 从“工具”菜单中,选择“选项”。
  2. Expand the "Environment" category, and select the "Keyboard" item. 展开“环境”类别,然后选择“键盘”项。
  3. Begin typing CleanSolution into the text box labeled "Show commands containing:". 开始在标有“显示包含:的命令”的文本框中键入CleanSolution
  4. Select the item in the list box below with the title "Build.CleanSolution". 在下面的列表框中选择标题为“Build.CleanSolution”的项目。
  5. Click in the text box labeled "Press shortcut keys:", and type the keystroke you want to use to trigger this command. 单击标有“按快捷键:”的文本框,然后键入要用于触发此命令的击键。
  6. If there are any conflicts with other commands that already have that shortcut assigned to them, you'll either need to modify their keyboard shortcut, or choose a different shortcut. 如果与已分配了该快捷方式的其他命令存在任何冲突,则您需要修改其键盘快捷方式,或选择其他快捷方式。
  7. When the shortcut appears as you'd like it to, click the "Assign" button. 当您想要显示快捷方式时,单击“分配”按钮。
  8. And finally, click "OK" on the Options dialog. 最后,单击“选项”对话框中的“确定”。

配置“键盘选项”对话框

我使用ALT-BTC清洁,然后使用ALT-BTR进行重建:)

默认情况下没有热键,但您可以在工具 - >选项 - >环境 - >键盘中进行分配

As there is no default shortcut for Clean Solution. 由于Clean Solution没有默认快捷方式。 Just in case you want to create a shortcut for clean solution, i will advice to maintain similarity with other such kinds of shortcut already available. 如果你想为清洁解决方案创建一个快捷方式,我会建议保持与已有的其他类似快捷方式的相似性。 Like for : 像 :

Alt + B, B -> Build Solution
Alt + B, R -> Rebuild Solution
Alt + B, U -> Build current project
Alt + B, E -> Rebuild current project

In my case i specified : 在我的情况下,我指定:

Alt+C,Alt+S

for cleaning solution. 用于清洁溶液。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM