Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've just started coding in Visual Studio Code with .NET Core, on Ubuntu 14.04.4 I'm used to both using Ubuntu (from personal interests, hobby, etc) and .NET and Visual Studio at work.

But I've run into a problem i can't seem to overcome. I'm building a small console app that i want to communicate with a MySql Server, but I can't seem to get the MySql.ConnectorNET.Data working properly.

It was installed with the command dnu install MySql.ConnectorNET.Data And that seemed to work fine. The dependency was added in the project.json file, and intellisense was able to traverse the package just fine, but the OmniSharp Log reports that:

[INFORMATION:OmniSharp.Dnx.DnxProjectSystem] Project /home/<username>/VSCode/SimpleSQLatmpt/project.json has these unresolved references: MySql.ConnectorNET.Data

and I simply can't seem to fix that. VSCode seems to detect it, and asks me to run the dnu restore command. But it's to no avail. For all intends and purposes it seems like MySql.ConnectorNET.Data is available in the project, but just can't be used.

Can any one tell me how to fix this? And just as important, why it is happening in the first place?

Thank you very much for your time.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
238 views
Welcome To Ask or Share your Answers For Others

1 Answer

At the time of this question (Mar 2016) there was no .NET Core-compatible ADO.NET provider for MySQL.

Now situation is changed:

  • MySqlConnector written by Bradley Grainger -- licensed under MIT, and offers full async support
  • MySql.Data (>6.10) provided by Oracle (traditionally, GPL)

Personally I prefer MySqlConnector -- it can be used in commercial projects for free (MIT license); also I've tested it with my NReco.Data library under Linux, and it works perfectly in my scenarious. Unfortunately, MySqlConnector doesn't support EF Core yet.

--- UPDATE --

One more .NET Core-compatible MySQL connector + EF Core MySQL provider:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...