Description:
My setup is as follows:
- Visual Studio 2013 Ultimate
- MySQL for Visual Studio 1.2.3 installed
I created a new project today using MySQL Connector/NET 6.9.8. Since this was the first project requiring this, the dialog box for creating an ADO.Net data model from database (i.e. an edmx file) closed with no message. I've seen this many times before, so I went through my standard procedure of upgrading the local copy of MySQL Connector/NET from 6.9.7 to 6.9.8. After performing the upgrade, the following occurred:
- I was able to open the edmx file and edit it for the 6.9.8 project. Hooray!
- I was unable to open any edmx files in projects whose edmx files were originally created with entity framework 5.
On projects whose edmx files were originally created during EF5, the following error appears when attempting to open the edmx file or when compiling the project (it should be noted that the project in question references Connector/NET 6.9.7, not 6.9.8):
Error 4: Could not load file or assembly 'MySql.Data.Entity.EF5, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The edmx designer also says "The Entity Data Model Designer is unable to display the file you requested".
Upon downgrading the locally installed MySQL Connector/NET back to 6.9.7, the message went away and I was again able to open those kinds of edmx files and compile projects that used them.
I tested this on several projects. Here are the results after the local connector/net upgrade (note the distinction between the locally installed version and the version that the project references):
- EDMX created for EF6 originally, referencing connector 6.9.8 Works
- EDMX created for EF6 originally, referencing connector 6.9.7: Works
- EDMX created for EF5 originally, upgraded sometime in 2014 according to Microsoft's instructions, now using EF6 referencing connector 6.9.7: Does not work
- EDMX created for EF5 originally, upgraded sometime in 2014, now using EF6 referencing connector 6.9.8: Does not work
I tested the pre-EF5 result with two different projects to reduce the likelihood of an individual project configuration problem. These projects are quite large and there have been changes made to the edmx file from the defaults, so it would be nice if I didn't have to recreate every single edmx file just to get things to compile on my machine. For the time being, I have downgraded my local copy of MySQL Connector/NET, but this is not a good long term solution since it prevents me from quickly creating new edmx files (since the local copy seems to need to be >= the version referenced in the project).
So, in summary: Upgrading the locally installed copy of MySQL Connector/NET to version 6.9.8 breaks the EDMX designer for edmx files created using EF5.
How to repeat:
- Install MySQL Connector/NET 6.9.8
- Load a project with an edmx file created with EF5
- Open the edmx file or attempt to compile the project