vs 2013 and "Unable to load the specified metadata resource" RRS feed

  • Question

  • I'm using VS 2013 and SQL Svr 2012 and trying use EF to populate a gridview.  As this is a very simple test, I have one table with a key and a couple of data fields.  The process of creating the model seems to work fine - it shows as expected in the designer view, the files are created in app_code, a bin folder is created with 2 dlls, and the config file is updated with a connection string and other entries.

    When I try to select the "named connection" I get the error "Unable to load the specified metadata resource" and it talks about rebuilding the project to get the assemblies.

    I've spent hours reading other cases like this and I can't understand:

    1.  Why this is happening when it was never a problem with VS 2010

    2.  How do I fix the connection string to point to the resources it wants.  I'm totally lost with all the technical advice about fully qualified assembly names - nothing I try works.

    3.  How do I set some parameter to force the resources to be in the proper place?  All the advice I've read doesn't seem to relate very well with VS 2013.

    Here is how the App_Code folder appears

        <!-- For more information on Entity Framework configuration, visit -->
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.5.1">
            <add assembly="System.Security, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Data.Entity.Design, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
            <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
        <httpRuntime targetFramework="4.5.1" />
        <add name="TinyDBEntities" connectionString="metadata=res://*/App_Code.Model.csdl|res://*/App_Code.Model.ssdl|res://*/App_Code.Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=xxx\sqlexpress;initial catalog=TinyDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
          <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />

    here is the error:

    If the suggestion is to change the connection string, please be specific as I'm not sure what people mean when the suggest dll names, assembly names, etc.


    Dave Harney

    Friday, October 25, 2013 9:52 PM