Why doesn't F5 rebuild project before execution in Visual Studio?
Also :
Right Click on the solution in the solution explorer.
Click on "Properties".
Navigate to configuration Properties -> Configuration on the left side of the window.
Make sur the "Build" checkbox is checked on the line of your project.
Is it possible that you've reconfigured your "Build and Run" settings to "Never build"?
To check, follow these steps:
- From the Visual Studio IDE, open the "Tools" menu, and click "Options".
- Expand the "Projects and Solutions" header on the left.
- Click the "Build and Run" item.
- In the combo box labeled "On Run, when projects are out of date", ensure that you have the "Always build" option selected.
Another reason (which I had) could be dependencies.
In Solution Explorer, right click the Startup Project - Build Dependencies - Project Dependencies.
If the project you are working on is not set as a dependency of the Startup project then it won't get Built when you F5 / run.