System.Data.MetadataException: Unable to load the specified metadata resource


The standard metadata string looks like this:

metadata=res:///Model.csdl|res:///Model.ssdl|res://*/Model.msl

And this works fine in most cases. However, in some (including mine) Entity Framework get confused and does not know which dll to look in. Therefore, change the metadata string to:

metadata=res://nameOfDll/Model.csdl|res://nameOfDll/Model.ssdl|res://nameOfDll/Model.msl

SYNTAX : res://<assemblyname>/<path to your model>.csdl ….. So on

Further reference for this error : http://itstu.blogspot.com/2008/07/to-load-specified-metadata-resource.html

Happy Coding…. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s