Wednesday, April 18, 2012

MetadataException: Unable to load the specified metadata resource

This means that the application is unable to load the EDMX. If you see this error in your test run, it means you forgot to add your connection strings for your data context. 

Error should say something about connection string instead of that message.

Other reasons:

  • MetadataArtifactProcessing property of the model may be wrong
  • The connection string could be wrong. eDMX connection str syntax may be wrong. Copy the default and change inside.
  • You might be using a post-compile task to embed the EDMX in the assembly, which may not working for renaming.
  • May be you renamed some assembly name
For other reasons related to edmx file in your project, you may need to delete that and create that again. It will use correct Assembly names. Reset sometimes is the best way to fix things.

1 comment:

Let me know what you think?