Metadata Path issue for Entity Connection "Unable to load the specified metadata resource."

Last post 08-19-2009 8:40 PM by dm19898. 1 replies.

Sort Posts:

  • Metadata Path issue for Entity Connection "Unable to load the specified metadata resource."

    12-22-2008, 9:31 PM
    • Member
      48 point Member
    • rcfearn
    • Member since 07-05-2008, 10:39 PM
    • Posts 31
    I have two folders in a project Connections & Entities, I wan't to build an EntityConnection object in a class in the Connections folder that sets up connections for Entity Models in the Entities folder but I am having a problem with the MetaData property: When I run the code with the above setup and entityBuilder.Metadata = @"res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl"; I get an "Unable to load the specified metadata resource.", If I move the Entity Models out of the Entities folder into the root of the project it works correctly. If I move the Entity Models back to the Entities folder and change the MetaData string to @"res://*/Entities/Model1.csdl|res://*/Entities/Model1.ssdl|res://*/Entities/Model1.msl"; I get the following error : "The specified metadata path is not valid. A valid path must be either an existing directory, an existing file with extension '.csdl', '.ssdl', or '.msl', or a URI that identifies an embedded resource." Any ideas on how I can set this up correctly? Thanks in advance Rob
  • Re: Metadata Path issue for Entity Connection "Unable to load the specified metadata resource."

    08-19-2009, 8:40 PM
    • Member
      107 point Member
    • dm19898
    • Member since 02-13-2003, 3:16 PM
    • Posts 22

    I found this on the MSDN site as I was having the same problem

     

    "I deleted the Model file and the app.config file. Once deleted, I created them again, and it is now working.
    I do not know why this hapenned, but somehow it is working."


    Basically if you make any changes to the model this may happen.

     

     

Page 1 of 1 (2 items)