Project Reference Disappears After Build

A few times now, I’ve added new projects to legacy solutions in Visual Studio, only to find that they have issues when it comes time to build.

Normally I sit there pulling my hair out checking references for 5 minutes before I remember my old foe: The .Net 4.0 Client Profile!

Updating the project’s framework from .Net 4.0 Client Profile, back to standard .Net 4.0 (or 3.5 or whatever flavour of Framework you desire) will fix the problem.