如何解决此警告“元素'entityFramework'具有无效的子元素'provider'。预期可能元素的列表:'contexts,defaultConnectionFactory'" [英] How to solve this warning "The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts, defaultConnectionFactory'"

查看:68
本文介绍了如何解决此警告“元素'entityFramework'具有无效的子元素'provider'。预期可能元素的列表:'contexts,defaultConnectionFactory'"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 MVC 技术的新手。我们正在使用Asp.net MVC4 < b> MySql database.Im使用Entity Framework访问数据。运行程序时显示错误,如:



Im new to the MVC technology.we are using Asp.net MVC4 with MySql database.Im accessing data using Entity Framework.While running the program it shows an error like.

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized element 'providers'.





并发出类似
的警告




And having a warning like

The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts, defaultConnectionFactory'





任何建议都被接受。



Any suggestions are accepted.

推荐答案

我通过复制两个文件来解决这个错误,例如

(1)EntityFrameworkCatalog.xml文件

(2)EntityFrameworkConfig_6_0_0.xsd



来自

https://entityframework.codeplex.com/SourceControl/latest#src/EFTools/setup/EFToolsMsi/XmlSchemas/EntityFrameworkCatalog.xml



并将这些文件放在C:\Program Files \ Microsoft Visual Studio 10.0 \Xml \Schemas文件夹中。

首先从上面的链接下载整个zip文件。



从中提取上面两个文件(xml,xsd)来自以下位置

src \ EFTools \setup \ EFToolsMsi \ XmlSchemas 。并复制到C:\Program Files \ Microsoft Visual Studio 10.0 \Xml \Schemas。



为什么因为日复一日的软件更新。因为因此我们必须使用更新的软件。



(或)



您可以安装VS2012的EF6 Designer来自

http:// www。 microsoft.com/en-us/download/details.aspx?id=40762

它将更新验证配置文件的架构。



注意:执行此操作时,您必须关闭visual studio。完成所有过程后,您必须重新启动Visual Studio。
I resolve this error by copying two files like
(1)EntityFrameworkCatalog.xml file
(2)EntityFrameworkConfig_6_0_0.xsd

from
https://entityframework.codeplex.com/SourceControl/latest#src/EFTools/setup/EFToolsMsi/XmlSchemas/EntityFrameworkCatalog.xml

and place those files in "C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas" folder.
At first download the entire zip file from above link.

From that extract the above two files(xml,xsd) from the below location
"src\EFTools\setup\EFToolsMsi\XmlSchemas". and copy to "C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas" .

Why because day by day software is updated.Because of that reason we have to work with updated softwares.

(or)

You can install the EF6 Designer for VS2012 from
" http://www.microsoft.com/en-us/download/details.aspx?id=40762"
and it will update the schema that validates config files.

Note: While doing this you have to close visual studio.After completing all process,You have to restart Visual Studio.


这篇关于如何解决此警告“元素'entityFramework'具有无效的子元素'provider'。预期可能元素的列表:'contexts,defaultConnectionFactory'&quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆