KMC
KMC

Reputation: 20046

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?

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.

Upvotes: 18

Views: 14946

Answers (4)

Suresh Prajapati
Suresh Prajapati

Reputation: 4477

As there is no default shortcut for 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.

Upvotes: 1

Cody Gray
Cody Gray

Reputation: 244823

The keyboard shortcut combinations are sometimes dependent upon the profile settings you chose when you first installed 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).

That being said, I don't think any of the default profiles set up a keyboard shortcut for "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:".
  4. Select the item in the list box below with the title "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.

   Configuring the Keyboard Options dialog

Upvotes: 38

Alessandro
Alessandro

Reputation: 3760

I use ALT-B-T-C to Clean and then ALT-B-T-R to Rebuild :)

Upvotes: 5

MadBender
MadBender

Reputation: 1458

There's no hotkey by default, but you can assign it in Tools->Option->Environment->Keyboard

Upvotes: 3

Related Questions