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
After looking around for a while, I found some a similar issues, but they were all regarding a build failure, which is not my case (this happens only after edit-continue).
What I have tried so far:
Some extra info:
Debug
configuration the error does not occur.Any ideas?
Metadata refers to binary information saved in memory or a language runtime portable executable file. When you compile code from a portable executable file, data is added to another file section. The code is converted to MSIL (Microsoft Intermediate Language) before moving to another file partition.
Metadata is information stored in almost any type of file. It can include your name, your company or organization's name, the name of your computer, the name of the network server or drive where you saved the file, personalized comments and the names and times of previous document authors, revisions, or versions.
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.
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
As far as I can tell, this happens when the project dependencies gets messed up for whatever reason (whilst all the inter-project references are still intact). For many cases, it is NOT a code issue. And for those who have more than a few projects, going through them one at a time is NOT acceptable.
It's easy to reset project dependencies -
For those who have an issue in their code or some other issue that's causing this problem you'll obviously have to solve that issue first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With