I am trying to return an entity object from entity framework 5.0.0 in a WCF service according to this tutorial by Rainer Stropek. I am using EF 5.x DbContext Generator with WCF Support. When I try to debug the service, I get this warning, which prevents it from running:
The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'. F:\Dropbox\KelesoftSOMA\KelesoftSOMA.DataService.Administration\Web.config 40 6 KelesoftSOMA.DataService.Administration
The web.config file looks like this:
...
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
...
Please help me out.
Than
This happened to me running vs-2013 preview.
The App.config/Web.config IntelliSense files that get installed by EFTools.msi should be updated to include valid EF6 elements. The xsd for "validating" EF config section in web/app.config file does not recognize newly added EF6 elements. It should be updated so that it does not show squiggles for valid EF6 config file.
Update the config xsd to recognize the elements added in EF6 (i.e. ). These files are located in the Visual Studio install area like ~ "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Xml\Schemas". This is not a 100% complete - sorry I am in time-box mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With