Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set Visual Studio to always build and debug when F5 is pressed? [duplicate]

Tags:

It used to do this, but now if I don't build the solution first before pressing F5, it uses the last built program.

I must have messed up a setting somewhere I think.

like image 301
Joan Venge Avatar asked Oct 11 '11 00:10

Joan Venge


People also ask

How do I keep debugging in Visual Studio?

In most languages supported by Visual Studio, you can edit your code in the middle of a debugging session and continue debugging. To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press F5, F10, or F11 to continue debugging.

How do I set Debug configuration in Visual Studio?

In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build (or Compile in Visual Basic). In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual Basic).

How do I apply a conditional breakpoint in Visual Studio?

Right-click the breakpoint symbol and select Conditions (or press Alt + F9, C). Or hover over the breakpoint symbol, select the Settings icon, and then select Conditions in the Breakpoint Settings window.

What is Ctrl F5 in Visual Studio?

F5 is used to start your project in debug mode and Ctrl-F5 is used to start your project without debug mode.


2 Answers

  1. Open the "Tools" menu, and click "Options".

  2. Expand "Projects and Solutions".

  3. Click on "Build and Run" tab.

  4. In the "On Run, when projects are out of date" dropdown, select "Always build".

like image 149
Porco Avatar answered Oct 13 '22 00:10

Porco


You are probably working on a multi-project solution:

  • Get properties of your solution (right click → Properties)
  • Click on "Configuration Properties".
  • Tick the "Build" check box for the project that is not compiled properly.
like image 25
Ali Avatar answered Oct 13 '22 00:10

Ali