37

I'm writing code in Visual Studio but whenever I want to test the application and press the green arrow for "Start debugging", Visual Studio does not automatically recompile the active solution for me and I have to manually build the solution then debug it.

Visual Studio used to automatically build before debug and I want this back as contantly having to manually build is a serious pain.

Thanks

5 Answers 5

47

In the Visual Studio settings under Projects and Solutions->Build and Run change the option On Run, when projects are out of date: from Never Build to Always Build

Edit: Per your comments, open the "Configuration Manager" (in the Debug/Release dropdown) and ensure that the Build checkbox is checked for all of the projects you want to build in each of your configurations.

7
  • 1
    its not working :(
    – Kurru
    Apr 28, 2010 at 16:56
  • Changed the build type to "release" and it worked fine. What are the differences between building for 'Debug' instead of 'release'?
    – Kurru
    Apr 28, 2010 at 17:01
  • 11
    Did you open the Configuration Manager to make sure that the "Build" checkbox is checked under the debug configuration?
    – heavyd
    Apr 28, 2010 at 21:13
  • 1
    Ahhh thank you! Thank fixed it! Never even noticed the configuration manager menu item before.
    – Kurru
    Apr 29, 2010 at 11:09
  • 3
    There is also an option "Only build startup projects and dependencies on Run". If it's set and your dependencies are not "good enough", Studio might skip building some of your projects. Unsetting this option helps.
    – Steed
    Aug 27, 2012 at 12:16
13
  • Navigate to Debug > Options and Settings in the VS menu or Tools > Options...
  • Go to 'Projects and Solutions' > 'Build and Run' and make sure that the “Only build startup projects and dependencies on Run” box is left unchecked.
0

For me, I was missing the config under Project -> Project Dependencies, which updates the .sln file to ensure correct build order for projects.

-1

Tool --> Options --> Project and Solutions --> "On Run, The project is out of date" never build --> change to Always build. I solved me

1
  • 1
    It is unclear as to what you are suggesting
    – Prasanna
    Apr 12, 2016 at 13:53
-1

Tool --> Options --> Project and Solutions.

  1. Set as Always build / Prompt to Build for "On Run, The project is out of date"
  2. Uncheck the check box for "Only build startup projects and dependencies on Run"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .