I got this issue running a console app where the source that was different was the source that had the entry-point (static void Main). Deleting the bin and obj directories and doing a full rebuild seemed to correct this, but every time I made a code change, it would go out-of-date again.
The reason I found for this was:
- I had checked “Only build startup projects and dependencies on Run” (Tools -> Options -> Projects and Solutions -> Build and Run)
- In Configuration Manager, my start-up project didn’t have “Build” checked
(For #2 -> accessible via the toolbar under the ‘Debug/Release’ drop down list.)