VS2013 connection to MySQL; Your project references the latest Entity Framework; However, you cannot find the version-compatible Entity Framework database that is required for the data link EF6 the technique of using MySQL

Source: Internet
Author: User

Because it was all about looking at someone else's project, instead of building a project from start to finish, there was a problem with this attempt to build, mainly the VS2013 and MySQL connections in the ASP. NET MVC project.

First question:

The database tables are built, the corresponding database processing classes are written, and then the entity model is created (right-model-> new item--Data->ado. NET Entity Data model) without MySQL option, search the Internet for a lap, need to download

Mysql-for-visualstudio, Online Search When everyone is recommended to download mysql-for-visualstudio1.1.1, but I did not find this version on the official website, so the download is mysql-for-visualstudio1.1.4, the URL is

http://dev.mysql.com/downloads/file/?id=451295, the problem was solved after the installation was successful.

Second question:

Because I have imported a well-written web program, if it is not installed mysql-connector-net6.8.3 will not be able to properly display. EDMX model, so I installed before, did not appear this problem,

The hero here http://blog.csdn.net/niewq/article/details/41877301 introduction of quite detailed, I would like to remind you to remember your installation directory, will be used later.

Question three:

To get here, I thought I could build the model smoothly, and didn't expect this problem to occur

Fortunately, there are people on the internet who have the same problem, that is, the http://blog.csdn.net/niewq/article/details/41877301 of the great God above

Overall, four steps:

First, the Package Manager console, the Library installer package, tools----Enter after the pm>

1 install-package entityframework-version 6.0.0 then enter to prompt for success
2 install-package entityframework.zh-hans-version 6.0.0 then enter to prompt for success
3 Install-package Mysql.data.entity.ef6,enter, I use this method without success, there are the following problems:

Install-package: Could not find package "MySql.Data.Entity.EF6".
Location Line: 1 characters: 16
+ install-package <<<< MySql.Data.Entity.EF6
+ categoryinfo:notspecified: (:) [Install-package], InvalidOperationException
+ Fullyqualifiederrorid:nugetcmdletunhandledexception,nuget.powershell.commands.installpackagecommand

Now, how do I solve this problem?

Browse through the right-click Project, add Reference, and refer to all DLL files under MySQL Connector Net 6.8.3\assemblies\v4.5

4 Add the provider node to the Web. config:

<provider invariantname= "MySql.Data.MySqlClient" type= "MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6 "></provider>

After these steps, the problem is solved!!

VS2013 connection to MySQL; Your project references the latest Entity Framework; However, you cannot find the version-compatible Entity Framework database that is required for the data link EF6 the technique of using MySQL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.