Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 676
KMC Avatar asked Apr 08 '11 09:04

KMC


People also ask

How do I clean up Visual Studio?

To build, rebuild, or clean an entire solution Choose Build All to compile the files and components within the project that have changed since the most recent build. Choose Rebuild All to "clean" the solution and then builds all project files and components. Choose Clean All to delete any intermediate and output files.

What is the code to clean solution in Visual Studio?

Choose Rebuild Solution to "clean" the solution and then build all project files and components. Choose Clean Solution to delete any intermediate and output files. With only the project and component files left, new instances of the intermediate and output files can then be built.

Is rebuild the same as clean and build?

For a multi-project solution, "rebuild solution" does a "clean" followed by a "build" for each project (possibly in parallel). Whereas a "clean solution" followed by a "build solution" first cleans all projects (possibly in parallel) and then builds all projects (possibly in parallel).


1 Answers

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

like image 130
Cody Gray Avatar answered Oct 10 '22 21:10

Cody Gray