Here's are some workarounds I've used:
- Simply shutdown Visual Studio 2010, restart and rebuild. This seems to fix the problem most times.
- If option #1 doesn't work, do the following:
- Remove the offending project(s) from the solution
- Go to the folder where the project lives and delete everything except the project itself.
- Re-add the project to the solution
- Rebuild.