我有一个MVC 5应用程序,我第一次配置使用Mysql,但现在希望它使用SQL Server。EF代码首先到SQL Server的Mysql
我的应用程序首先使用代码和迁移来生成数据库。
后,我改变了所有必要的配置我试图运行从包管理控制台更新,数据库,但我不断收到此错误:在创建数据库后出现
System.Data.Entity.Core.MetadataException: Schema specified is not valid. Errors: (0,0) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
此错误。当我运行应用程序时,它也会出现,因为它在那个时候检查是否有任何迁移。
不知何故,即使所有提供者都指向SQL Server,它仍会尝试使用MySQL。
任何帮助将更受欢迎。
在此先感谢
显然不是所有的提供者都指向SQLServer – RiggsFolly
确实非常明显,我试图检查哪里可以找到和找不到。即使当我在所有解决方案文件上进行全文搜索时,我都找不到以下单词的跟踪:“Mysql” 以下是我唯一的配置文件:http://pastebin.com/FVf31aJ9 如果您发现错误提供者设置请让我知道:) – Carlos