The type or namespace name 'MySqlConnection' could not be found (are you missing a using directive or an assembly reference?)

冷暖自知 提交于 2019-12-11 00:14:22

问题


so I'm making a project and I'm almost done with it and this error got me, I thought in the 1st place my database is not connected but it's connected and I don't really know what is the solution for it(correct me if I'm wrong in the problem that I gave.)and im using a visual studio 2013

I have done reconnecting my database by checking and unchecking it but still doesn't workthis is the error that I got


回答1:


You should need to add a .dll to the Reference section in the Solution Explorer (from GAC or browse for file).




回答2:


You need to install the package MySql.Data

PM> Install-Package MySql.Data

for more check this question: MySql doesn't work in Visual Studio 2012 : The type or namespace name 'MySql' could not be found



来源:https://stackoverflow.com/questions/57836838/the-type-or-namespace-name-mysqlconnection-could-not-be-found-are-you-missing

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