As you can see i've already installed the necessary mysql packages such as Mysql for Visual studio and Connector/NET but no matter what the mysql is not appearing in Visual studio 2017 Data source menu, any suggestion ? :
My circumstance is a bit different: during the first time I installed it, the option is there but the next day it's missing.
I tried uninstalling then installing Mysql for Visual studio and Connector/NET before restarting my laptop but it still didn't appear until I went to Tools > Extensions and Updates... in the main menu. A pop-up Extensions and Updates will appear and under Installed, find MySQL for Visual Studio and enable it. After closing Visual Studio, the option came back after starting Visual Studio again.
(I hypothesise VS disabled it because it made running slower. I'm using Visual Studio 2017 btw)
I just had the same situation when trying to configure Visual Studio Professional 2017 environment with MySQL, ADO.NET (Database First) and EF6.
Note: Please follow steps in the same order.
Uninstall/remove "Connector/NET" and "MySQL for Visual Studio" if installed.
Install "MySQL for Visual Studio" v2.0.5 CTP (MySQL for Visual Studio). Note: Install MySQL for Visual Studio before Connector/NET.
Install "Connector/NET" v6.9.10 (Connector/Net). https://i.stack.imgur.com/XOT1I.jpg Note: I tried using Connector/NET v6.8, v6.10 and v8 first, but none of them worked with Visual Studio 2017 and ADO.Net. Here you can find all Connector Versions and Compatibilities with Visual Studio IDEs, but so far this list is inaccurate.
Note: Until this step, you should be covered, but you'll then encounter Entity Framework issues, follow the next steps to completely configure your environment and you should be good to go.
Create new Visual Studio Professional 2017 project.
Download and Install "EntityFramework" v6.2.0 through NuGet, by going to Project Tab/Manage NuGet Packages/Browse -> Entity Framework.
Add references to C:\Program Files (x86)\MySQL\Connector.NET 6.9.10\Assemblies\v4.5\MySql.Data.dll
and
C:\Program Files (x86)\MySQL\Connector.NET 6.9.10\Assemblies\v4.5\MySql.Data.Entity.EF6.dll
; by Right Clicking over References inside Solution Explorer and selecting Add Reference/Browse ->Browse button.
Add MySQL EF6 provider info inside App.config under entity framework providers as follow:
<entityFramework>
<providers>
<provider invariantName="MySql.Data.MySqlClient"
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
</providers>
</entityFramework>
And that's it. VS2017 is ready to go. Hope this works for everybody, as it did for me today.
References:
Can't Create Entity Data Model - using MySql and EF6
No Entity Framework provider found for 'MySql.Data.MySqlClient' ADO.NET provider
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With