Search code examples
c#asp.net-mvc-3entity-frameworkedmxdevart

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


My connection strings are as follows:

<add name="RollCallDBEntities" connectionString="metadata=res://System.Engine/RollcallNS.csdl|res://System.Engine/RollcallNS.ssdl|res://System.Engine/RollcallNS.msl;provider=Devart.Data.Oracle;provider connection string=&quot;User Id=user;Password=password;Server=127.0.0.1;Direct=True;Sid=ORCL&quot;" providerName="System.Data.EntityClient" />

my code are as follows:

using (var db= new RollCallDBEntities()) //ok
{
   var query = db.TBL_ROLLCALL.ToList(); //Unable to load the specified metadata resource.
}

my assembly:

System.Engine

Anyone have any ideas?

these links did not soled my problem:
MetadataException: Unable to load the specified metadata resource
entity framework Unable to load the specified metadata resource
Entity Framework: Unable to load the specified metadata resource
Unable to load the specified metadata resource


Solution

  • Refer to http://forums.devart.com/viewtopic.php?t=22092 .

    If this doesn't help, please specify:

    • are you working with ADO.NET Entity Data Model (.edmx) or Devart Entity Model (.edml)?
    • the value of your model file's Build Action property
    • the value of the Metadata Artifact Processing property of your model
    • the build number (x.xx.xxx) of your dotConnect for Oracle
    • the version of your Visual Studio
    • follow Pawel's advice to check if resources were embedded in the assembly