Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't solve Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'

I have a web ASP.NET site that it working fine with WCF services. Now, I have a class Library for Telerik Reports that also needs to call these same web services. I keep getting the error Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'. when I try to add a Service Reference to the web service. I have searched the topic and done everything people pointed out. In the project that implement the web services and the site, the config has:

compilation debug="true" targetFramework="4.5">
        <assemblies>
          <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
          <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
          <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

          <add assembly="Telerik.ReportViewer.WebForms, Version=8.0.14.225, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
          <add assembly="Telerik.Reporting, Version=8.0.14.225, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
        </assemblies>
        <buildProviders>
          <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
        </buildProviders>

And in the class library config:

<compilation debug="true" targetFramework="4.5">
    <assemblies>
      <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    </assemblies>
    <buildProviders>
      <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
    </buildProviders>

All of the answers I've read say to add the following but it still does not work:

<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
like image 898
user2471435 Avatar asked Apr 14 '14 14:04

user2471435


2 Answers

I had the same error in visual studio 2015....

Could not load type System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider

I solve the problem by adding the line:

<assemblies>
....
 <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
....    
</assemblies>

in main Web.config file and the problem disappeared.

like image 157
MuniR Avatar answered Nov 11 '22 06:11

MuniR


This is the layout of this error making assembly:

<system.web>
    <compilation debug="true" targetFramework="4.5">
        <assemblies>
            <add
                assembly="System.Data.Entity.Design, Version=4.0.0.0,Culture=neutral,
                PublicKeyToken=B77A5C561934E089" />
        </assemblies>
    </compilation> 
    <httpRuntime targetFramework="4.5" />
</system.web>
like image 5
Hasnain Mehmood Avatar answered Nov 11 '22 07:11

Hasnain Mehmood