I believe the problem is documented here moved here and looks like it might be a bug in visual studio, but I\'m wondering if anyone knows of a workaround.>
I fixed this by replacing all $(SolutionDir) with $(ProjectDir)..\.
$(SolutionDir)
$(ProjectDir)..\
It was due to MSBuild running each project independently, and thus not the solution. It worked fine in VS2010, but not on the build server.