NepdeBrio NepdeBrio - 1 month ago 15
MySQL Question

Cannot create .edmx for MySql Database with mysql.data.entity.EF6 in Visual Studio

Recently i am trying to developing n-tier asp.net mvc application using Entity Framework with MySQL as the backend database. I wanted to use latest EntityFramework ie 6.9.9.0 version, so i downloaded sqlconnector package through "Nuget package Installer". These are the libraries that it installed for me:

mysql.data.dll(ver. 6.9.9.0)



mysql.data.entity.EF6(ver 6.9.9.0)



But i could not successfully create .edmx file for my project. During the final steps of creation of .edmx , it ends in the error. Here are the steps I applied:

1) first I selected '.net framework database provider' for mysql as in screenshot


2)Then I clicked 'next' button as in the screenshot


3)Finally i selected the tables for the database that i want to import in the entity data model before i click 'finish'


4) Click on "finish" button pops up "null object reference" error.
enter image description here

closing the error dialog displays the "add entity model" dialog again
enter image description here

The process creates a blank .edmx file with not a single DB tables on it.Also I find no errors in visual studio error list at the bottom of the window.

Could anyone share insight on what could be the possible issues here, i am really stuck at the first step of code my application and has already spent almost whole day searching for solution over the internet. I personally tried many alternatives seeking for solution too, but no luck so far. Anyone's help would be truly appreciated.

Thank you.

Answer

I somehow sensed that I am not using the right version of

EF tools for Visual Studio 2013

with corresponding version of MYSQL server installation and mysqlconnector for .net. So i downloaded and compared several versions of EF tools, MYSQL installer and MYSQL(Nuget package) for entity framework and finally found the right combination as follows:

  1. Entity Framework 6.1.3 tools for Visual Studio 2013
  2. MYSQL-installer-community-5.6.32.0.msi (you can find archived mysql
    version in google)
  3. MYSQL(Nuget package) for entity framework like in the screen shot below:

enter image description here

As it worked for me , i think mysql.data dll version and mysqlconnector for net that comes with MYSQL installer should match , i have them highlighted here in picture:

enter image description here

After the proper installation ,i finally got EDMX diagram loaded fully and correctly upon creating one.

P.S: after every un-installation of MYSQL server version that did not work for me, I used the useful tool (Advanced_Uninstaller11.exe) to clean all left out registry entries and here is the download link for the tool enter link description here

I Hope that I have explained it clearly of the problem and its resolution. I could not make any of the above points or scenario clear, hope you would comment on it and i would try to explain more and better.

And Thank you @ErikEJ for your continued support on the problem.

Comments