Friday, May 18, 2012

Start debugging F5 does not build automatically, Visual Studio

I was facing this issue from a long time and every time I overlook this issue by manually building required projects. I also posted the issue on stack overflow community but did not get any successful answer (Stackoverflow link).

Issue: Many times it happen that while working on application development, you use edit and continue option i.e. you write code while application is in debugging mode (like you hit breakpoint and start writing code from there on). I'm assuming that you've enabled Edit and Continue option from Option -> Debugging -> Edit and Continue dialog box. Now when you stop application and try to run it again using F5 the edited file is no longer compiled automatically and your changes are not reflected. So generally in this scenario we need to manually build the project having edited file from the solution explorer. But this will be a huge bottleneck to your performance if you need to make changes frequently in debugging mode.

Solution: If you're like me i.e. in case visual settings are going out of your bound then simply reset all settings to default one then you must have tried devenv/resetsettings command in order to fix this problem. But this does not solve our problem actual fix is :
1. Open the "Configuration Manager" from the Debug/Release dropdown and verify that Build checkbox is checked for all of the projects you want to build.
2.  Open Visual Studio settings from Debug -> Option & Settings. Then Project and Solutions -> Build and Run . Now in drop-down for "On Run, where projects are out of date:" Select 'Always Build' instead of 'Never Build'.

Hope this will fix your problem. It worked in my case.


  1. For those who still having trouble,

    Depending on your Project dependency configuration

    Unchecking following checkbox may help.

    Tools -> Options -> Projects and Solutions -> Build and Run -> Only build startup projects and dependencies on Run

  2. Thank you sooooooooo much, what a relief i am feeling now. your blog post will save my lot of time now during development.