Metadata file ... could not be found error when building projects

Solution 1:

i had the similar issue where "metadata could not be found". on the solution property, make sure that the "build" check box is marked in Build/Configuration Manager for each project.

Solution 2:

This is usually caused by a project that is referenced in a different solution than the one that is throwing the error. If you clean the other solution, or branch the code, you will more than likely see this error. The solution is to scroll down your list of "metadata not found" errors, and look at the references to the projects. 9/10 times, you will see a broken reference to a project that is not in this solution. Add the projects to fix the reference errors, and rebuild. That should fix it.

(I just ran into this today, and have in the past, and this has ALWAYS worked)

Solution 3:

I had this issue, not sure if it will help but mine was caused by having two different versions of the same project referenced by two different solutions. When I built the solution with the reference to the correct project first the second solution would build fine, however, if I cleaned the first solution and tried to build the second solution it would fail with these dll reference error messages.

The solution for me was figuring out I had two projects with the same name which had been accidentally duplicated and removing the reference to the old incorrect project and adding a reference to the new one.

In any case it seems that these messages are a bit of a red herring, I would check your build output and find the first project that fails to build and very carefully check the references on that project.