Visual studio – getting error “Metadata file ‘XYZ’ could not be found” after edit continue

Eventually what solved the issue was:

  1. Clean every project individually (Right click> Clean).
  2. Rebuild every project individually (Right click> Rebuild).
  3. Rebuild the startup project.

I guess for some reason, just cleaning the solution had a different effect than specifically cleaning every project individually.

Edit:
As per @maplemale comment, It seems that sometimes removing and re-adding each reference is also required.

Update 2019:
This question got a lot of traffic in the past, but it seems that since VS 2017 was released, it got much less attention.
So another suggestion would be – Update to a newer version of VS (>= 2017) and among other new features this issue will also be solved

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)