I have stumbled into an issue that is really annoying.
When I debug my software, everything runs OK, but if I hit a breakpoint and edit the code, when I try to continue running I get an error:
Metadata file 'XYZ' could not be found
Eventually what solved the issue was:
I guess for some reason, just cleaning the solution had a different effect than specifically cleaning every project individually.
As per @maplemale comment, It seems that sometimes removing and re-adding each reference is also required.