0

I've been getting an error while trying to generate a MySQL database from my ADO.NET Entity Model. I've setup a connection properly and can connect to it through my Server Explorer. Also the settings in the model seem correct: T4 Code generation strate, Database schema name is correct and the DDL Generation Template is set to SSDLToMySQL.tt. Also i cannot seem to map Entities to tables, the dropdown remains empty.

This is the error message: enter image description here

I've yet to find a solution and hope someone could help me out :) I'm new to EF and C#/VS etc.

Cheers,

3
  • which EF and MySQL .net Provider version do you use? Commented Dec 18, 2014 at 17:29
  • Both are the latest versions. EF 6.1.1 and MySQL.Data and MySQL.Data.Entity 6.9.5. I have also installed the latest Connector/NET from the MySQL website on my PC. The mysql server is running on ubuntu 12.04 and the mysql version is 5.5.40. Commented Dec 18, 2014 at 17:45
  • I've installed a local db running the latest version of mysql to see if this had something to do with it. I still get the same error message. Commented Dec 18, 2014 at 18:04

1 Answer 1

2

I found a solution on the MySQL bug pages.

Here goes:

Additionally there's a workaround:

On the machine where VS 2013 is installed, VS plugin (1.1.3 GA) and Connector/Net please do the following:

Note: close all VS instances before doing the steps.

On a Windows Explorer window go to this path or wherever the Connector/Net binaries were installed to. By default this is the location:

C:\Program Files (x86)\MySQL\MySQL Connector Net 6.8.3\Assemblies\v4.5\

Copy the file:

MySql.Data.Entity.EF6.dll

And paste it to this folder

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies

If it asks to overwrite it please do so.

In order to copy the file administrator rights are necessary.

Then you can try again to generate the script for your model. It should work fine.

It is important to have the 1.1.3 version of the VS plugin installed since this workaround is for that. The download link is at: http://dev.mysql.com/downloads/windows/installer/

Taken from the following page: http://bugs.mysql.com/bug.php?id=71427.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.