I had this issue recently when looking at someone elses solution.
Project A had a reference to project B, but when you tried to compile it would fail on Project A (because it couldn’t find any of the classes in project B) and the assembly for project B would not be copied to the BIN of Project A!
The errors looked like this:
C:WINDOWSMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(1360,9): warning MSB3253: The referenced assembly “MyAssemblyName” could not be resolved because it has a dependency on “System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” which is not in the currently targeted framework “.NETFramework,Version=v4.0,Profile=Client”. Please remove references to assemblies not in the targeted framework or consider retargeting your project.
After a lot of messing around it turned out that the “Target Framework” for Project A had been changed to “.NET 4.0 Client Profile” instead of just plain old “.NET 4.0”.
Change it back and rebuild: it’s that simple.