Metadata file 'XYZ' could not be found
Sometimes Visual Studio aborts building a Solution with the error message
Metadata file 'XYZ' could not be found
.
There are many reasons for this error (e.g. Project is not built at all, Clean and Build vs. Rebuild Issues). In my case it has been a project file which was not loaded properly. At the time of building it was unavailable
:
So always check whether there are unavailable
projects in Solution Explorer when a Solution is not building. Open the context menu of the unavailable project, then choose Reload project
and check Output Window for errors if it still cannot be loaded…