Unable to update EntityFramework models from MySQL database in Visual Studio 2015 RC

时间秒杀一切 提交于 2020-01-13 08:22:08

问题


My organization upgraded from Visual Studio 2013 to Visual Studio 2015 RC a couple months ago, and we only just now attempted to update some of our existing "db-first" EntityFramework models from our MySQL database. When doing so, we received the following error.

An exception of type 'System.ArgumentException' occurred while attempting to update from the database. The exception message is: 'Unable to convert runtime connection string to its design-time equivalent. The libraries required to enable Visual Studio to communicate with the database for design purposes (DDEX provider) are not installed for provider 'MySql.Data.MySqlClient'.

A quick SO search for this error produced this result from November of 2013 (specifically in reference to VS 2013)...

Apparently MySql and Visual Studio 2013 don't work together yet.

Here is a link on the MySql forums: http://forums.mysql.com/read.php?174,594798,600466#msg-600466

You'll probably need to wait for the next release of the MySql connector.

Does that mean this is likely a comparable issue, and we just have to wait it out until a new MySql.Data client is available that is compatible with VS 2015? Or is it possible that some other cause is to blame (perhaps a bug in VS 2015 RC)?

We're on the latest stable versions of Entity Framework (6.1.3), MySql.Data (6.9.6) and MySql.Data.Entity (6.9.6).

Especially curious to hear if anyone else has stumbled across this issue with VS 2015 RC in particular.


回答1:


What worked for me was to update the visual studio plugin, available here: http://dev.mysql.com/downloads/windows/visualstudio/




回答2:


Could you please update your VS 2015 from RC to RTM, update the nuget packages by running the following command:

update-package

This will get all latest stable nuget package in VS 2015.

Let me know if this fix your issue.




回答3:


In my case I installed VS 2017 after Mysql and because of that Mysql Visual Studio components didn't install for VS 2017.

For doing that, open MySQL for VS install and pick "Change"

And check components for VS 2017




回答4:


My reputation isn't high enough to leave a comment but this could help someone that ends up on this page. My case was similar to neustart47's however I tried to install the components through mysql installer - community, which failed complaining that VS wasn't installed (or something along those lines), which it was. So make sure to use the stand alone installer and not the mysql community installer. Why this even is a problem, I don't know.



来源:https://stackoverflow.com/questions/31177871/unable-to-update-entityframework-models-from-mysql-database-in-visual-studio-201

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!