MySQL MV6与MVC5和DNX

我有一个MVC5项目,使用MySQL.Data.Entity.EF6,我试图加载使用Kestrel(DNX)。

但是,我在页面负载上继续出现这个错误:

MetadataException: Schema specified is not valid. Errors: CMaxModel.ssdl(2,2) : 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. 

我用这个configuration创build了我的DbContext

 public class MyDbConfiguration : DbConfiguration { public MyDbConfiguration() { // Register ADO.NET provider var dataSet = (DataSet)ConfigurationManager.GetSection("system.data"); dataSet.Tables[0].Rows.Add( "MySQL Data Provider", ".Net Framework Data Provider for MySQL", "MySql.Data.MySqlClient", typeof(MySqlClientFactory).AssemblyQualifiedName ); // Register Entity Framework provider SetProviderServices("MySql.Data.MySqlClient", new MySqlProviderServices()); SetDefaultConnectionFactory(new MySqlConnectionFactory()); } } [DbConfigurationType(typeof(MyDbConfiguration))] public partial class CMax : DbContext { public CMax(string connectionString) : base(connectionString) { } 

即使从我读过的MVC不使用web.config,在wwwroot,我甚至进入了Web.Config文件:

 <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> </configSections> <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> <parameters> <parameter value="v12.0"/> </parameters> </defaultConnectionFactory> <providers> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"> </provider> </providers> </entityFramework> <system.data> <DbProviderFactories> <remove invariant="MySql.Data.MySqlClient"/> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> </DbProviderFactories> </system.data> <system.webServer> <handlers> <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/> </handlers> <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/> </system.webServer> </configuration> 

我在一个完整的损失,任何帮助,将不胜感激。