Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Visual Studio prompt before rebuilding?

Any way to have Visual Studio prompt before rebuilding, or any other way to make it easier to avoid hitting "Rebuild" instead of "Build"?

I've wasted countless hours when I right click on a project and select "Rebuild" on accident when I meant to click "Build".

This is for a native C++ solution.

like image 760
default Avatar asked Feb 19 '13 17:02

default


People also ask

What is the difference between build and rebuild in Visual Studio?

Build Solution - compiles code files (dll and exe) that have changed. Rebuild Solution - Deletes all compiled files and Compiles them again regardless of whether or not the code has changed.

What does clean do in Visual Studio?

Choose Clean All 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.

How do you stop a build in Visual Studio?

You can hit Ctrl + Break on the keyboard to cancel/stop a build that is currently in progress.


2 Answers

Visual Studio 2010 allows for customization of the menus. You can remove the "Rebuild" item from the Project context menu. Or you may want to just move the "Rebuild" command away from the "Build" command so that you will be less likely to accidentally hit the wrong item.

From VS 2010,

  • Select the Tools Menu
  • Select Customize...
  • Select the Commands tab
  • Select the "Context menu" radio button and select "Project and Solution Context Menus | Project"
  • Select "Rebuild" and move it or remove it.
like image 173
Tall Software Dude Avatar answered Oct 13 '22 01:10

Tall Software Dude


As far as I know, there is no way to enable a confirmation for performing a project or solution rebuild.

Your best option is to move or delete the "Rebuild" menu item on the context menu.

  1. Right click the menu/toolbar area in VS and select "Customize..."
  2. Click on the the "Commands" tab.
  3. Select the "Context menu" radio button.
  4. Find "Project and Solution Context Menus | Project" in the dropdown list.
  5. Click on the "Rebuild" menu item in the context menu representation and perform the desired action (delete, move up or down, begin a new group, etc.).

To reset the menu back to the default state, click the "Reset all" button.

like image 31
Peter Huene Avatar answered Oct 13 '22 02:10

Peter Huene