6.6.4 MySQL .NET連接器顯然支持EF6。我已經從EF5和.NET 4升級到EF6 alpha2和.NET 4.5。自升級以來,我重新創建了ADO.NET實體數據模型。EntityFramework 6 Alpha 2&MySQL Connector/NET 6.6.4
對數據庫做任何事情後,它拋出一個異常消息說:
ItemModel.ssdl(2,2):錯誤0152:沒有找到'MySql.Data.MySqlClient'ADO.NET提供程序的實體框架提供程序。確保提供程序在應用程序配置文件的'entityFramework'部分中註冊。有關更多信息,請參閱http://go.microsoft.com/fwlink/?LinkId=260882。
目前我的app.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>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
<connectionStrings>
<add name="ItemEntities" connectionString="metadata=res://*/ItemModel.csdl|res://*/ItemModel.ssdl|res://*/ItemModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=user;password=password;persist security info=True;database=Item_dbo"" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
是否有一個配置項,我合法地我的app.config丟失,還是我只是使用一個版本的MySQL的連接器和EF阿爾法是根本不互相兼容的尚未?
我的目的是在單聲道3.0.3下運行,當它在Windows上證明是成功的。
您所提供的修改的app.config不會影響歐錯誤的結果,但產生'無法找到或加載已註冊的.Net Framework數據提供程序錯誤。 也許我只需要考慮這個問題,等到EF6穩定出來。 (我最近添加了EF6的夜間版本到我的nuget,但仍然有相同的問題) – pierce