Could not get dependencies for project reference

asp.netmsbuildtfstfsbuild

I have a C# solution with a website project and a C# library.
When compiling the solution, the website gives the message:

Could not get dependencies for project reference 'MyLibrary'.

This does not stop the wbsite compiling and running until I try and build it with a TFS build, when this error message fails the build.

What does this mean and how can I get round it?

Best Answer

After trying many things, I realized something. The error was never going away, no matter what I did to clear the builds and such. I closed and reopened the solution and it went away.