Why doesn't F5 rebuild the project before running it in Visual Studio?

If I press F5 , my project starts, but it does not β€œsee” any changes that I made. I need to do a manual (re) assembly before pressing F5 to make it work.

It worked well previously. Any idea what I need to change?

+65
visual-studio build visual-studio-2010
Feb 07 2018-11-11T00:
source share
4 answers

Is it possible that you configured the "Build and Run" settings to "Never build"?

To check, follow these steps:

  • In the Visual Studio IDE, open the Tools menu and click Options.
  • Expand the "Projects and Solutions" heading to the left.
  • Click Create and Run.
  • In the β€œOn” combo box, when the projects are out of date, make sure that you have the option β€œAlways build” .

Selecting Always build in VS Options dialog

+73
Feb 07 2018-11-14T00:
source share

Also:

  • Right-click on a solution in the solution explorer.

  • Click "Properties."

  • Go to Configuration Properties β†’ Configuration on the left side of the window.

  • Select the Create check box on your project line.

+75
Mar 23 '11 at 8:13
source share

Another reason (which I had) may be dependent.

In Solution Explorer, right-click Startup Project - Build Dependencies - Project Dependencies.

If the project you are working on is not defined depending on the startup project, it will not be created when you run F5 / run.

+2
Oct 02 '17 at 11:38 on
source share

Well, for some reason, all of the above solutions do not work for me, so I did the Pre-Build event (Right-click Project β†’ Properties β†’ Build Events), where I delete the bin and obj folder before the build.

0
Jun 18 '19 at 9:24
source share



All Articles