Solve: Your project references the latest version of Entity Framework (for MySQL) in Visual Studio 2013

來源:互聯網
上載者:User

標籤:style   blog   http   io   ar   os   sp   for   strong   

The error message while trying to create a ADO.net Entity Data Model ( Entity Framework 6 ) for MySql Database in Microsoft Visual Studio 2013

" Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for your data connection. if you have already installed a have already installed a comptible provider, ensure you have rebuilt your project before performing this action. Otherwise, exit this wizard, install a compatible provider, and rebuid your project before performing this action."



Solution: 


1. Before start solution steps, check the following Pre-requirements:

  • You completely Install mysql-installer-community-5.7.3.0-m13.msi or Install both of mysql-visualstudio-plugin-1.1.1.msi and mysql-connector-net-6.8.3.msi.
 

2. Registering EF providers

  • Remove the default entityFramework tag in App.config or Web.config
  <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>  </entityFramework>

  

  • Add the following entityFramework tag:
  <entityFramework>    <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />    <providers>      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />    </providers>  </entityFramework>
 



3. Adding The following References to your project or check it versions:

  • MySql.Data.dll
  • MySql.Data.Entity.EF6.dll
  • MySql.Web.dll
     They should reside the following folders: 
  • C:\Program Files\MySQL\MySQL Connector Net 6.8.3\Assemblies\v4.5 (32bit windows)
  • C:\Program Files (x86)\MySQL\MySQL Connector Net 6.8.3\Assemblies\v4.5 (64bit windows)

 

 


4. Rebuild your project


5. Re-perform your steps of add ADO.NET Entity Data Model

Solve: Your project references the latest version of Entity Framework (for MySQL) in Visual Studio 2013

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.