Bug #70043 Generating a database from Model in VS2012 using SSDLToMySQL Fails
Submitted: 14 Aug 2013 23:43 Modified: 4 Nov 2013 18:01
Reporter: David Lopez Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Visual Studio Integration Severity:S2 (Serious)
Version:MySQL Connector 6.7.4 OS:Windows (WIndows 7)
Assigned to: Assigned Account CPU Architecture:Any
Tags: EF5, MySQL for Visual Studio 1.0.2, SSDLToMySQL.tt

[14 Aug 2013 23:43] David Lopez
Description:
Trying to use EF 5 with MySQL database using visual studio 2012, to create a Entity model for my solution.  Trying to generate the database file from the template wizard using the SSDLtoMySQL.tt template which fails. Throws and Object reference not set to an instance of an object.

I have installed:
MySQL connector version 6.7.4
MySQL Server 5.6
MySQL for Visual Studio 1.0.2

How to repeat:
Using Visual Studio 2012, install Nuget package MySQL.Data, MySQL.Data.Entities, MySQL.Web.  Create a new solution, add a class library project, then add an ADO.Net Entity model to the project, create your entities, naviagte to your model browser and change the DDL Generation Template to SSDLtoMySQL.tt, build your solution,  then right click and generate Database from Model from your edmx file.

You will be prompted to add a connection, and then it fails when it tries to create the file in the next step.  Throws an reference not set to an instance of an object.
[14 Aug 2013 23:45] David Lopez
Here's a screen shot of the error being thrown by the wizard

Attachment: Capture.png (image/png, text), 42.61 KiB.

[21 Aug 2013 16:07] Jonas Sourlier
Same problem here, but with the Oracle provider.

ODP.NET / ODAC 11.2.0.3.20.

If you find a workaround, please let me know, maybe your fix applies to my problem as well.

Thanks!
[23 Aug 2013 22:30] Lukas Faber
Same problem here with same setup ... It's impossible to do any Model to Database generation with SSDLToMySQL.tt DDL Generation Template ...

Please fix ASAP !!!
[23 Aug 2013 23:00] Lukas Faber
Error appearing on current VS2012, EF5 and Connector 6.7.4.0 ... even after applying workaround described in Bug #67964

Attachment: Screen Shot 2013-08-23 at 3.51.29 PM.png (image/png, text), 26.72 KiB.

[4 Nov 2013 18:01] Fernando Gonzalez.Sanchez
Thanks for the bug report.
This is a duplicated of http://bugs.mysql.com/bug.php?id=67964
[6 Nov 2013 18:11] Fernando Gonzalez.Sanchez
Jonas Sourlier,

For the ODP.NET issue, you may need to open a Service Request at support.oracle.com.

Regards.