AFAIK, VS 2012 Express is not supported by MySQL for Visual Studio as an extension, but MySQL Connector/NET supported, according to this article :
MySQL for Visual Studio does not support express versions of Microsoft development products, including Visual Studio and Microsoft Visual Web Developer.
To use MySQL Connector / Net with express versions of Microsoft development products, use MySQL Connector / Net 6.7.4 or later without installing MySQL for Visual Studio.
Here are some ways to use Connector / NET with EF:
Install MySQL Connector / NET, add the following 3 DLL files as a reference to your project:
MySql.Data.dll MySql.Data.Entity.dll (for EF6 it should be MySql.Data.Entity.EF6.dll) MySql.Web.dll
The necessary files exist on MySQL\MySQL Connector Net [version number]\Assemblies\[.NET version]\ , for example. C:\Program Files\MySQL\MySQL Connector Net 6.xx\Assemblies\v4.5\ .
- Change the
entityFramework element in your web.config depending on the version of EF used:
Ef 5
<entityFramework> <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity" /> </entityFramework>
Ef 6
<entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6"> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <providers> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" /> </providers> </entityFramework>
- Rebuild your project / solution and make sure that the "MySQL Database" option is available in the drop-down list of the data source.
Update:
After further research on the availability of the data source, I found that Visual Studio Express editions have a certain set of restrictions regarding third-party extensions, so in some cases they do not even allow you to create a connection to a MySQL instance in EDM development mode (thanks to Devart reminds me of this). As a workaround, you can use the CLI-based EDM generator (see example and usage description ), like this example:
edmgen.exe /mode:fullgeneration /c:"[MySQL DB connection string]" /project:[project name] /entitycontainer:[entity name] /namespace:[table namespace] /language:CSharp
Related problems:
mySQL DataSource on Visual Studio 2012
Cannot use MySQL connection for entity infrastructure 6
MySQL for Visual Studio 2012/2013