0

So MySql.Data dependency does not support DNXCORE version 5. Is there another dependency I could use to connect to MySql data source? I don't need Entity Framework.

Alex Polkhovsky
  • 3,340
  • 5
  • 29
  • 37

2 Answers2

3

Right now it is not possible to use mysql.data with DNX Core 5.0. You have to add the mysql.data from nuget, reference it to dnx451 and add the dependency there. Remove the "dnxcore50" item in the project.json and move the dependency to dnx451. it should look like this:

  "frameworks": {
    "dnx451": {
      "dependencies": {
        "MySql.Data": "6.9.8"
      },
      "frameworkAssemblies": {
        "System.Data": "4.0.0.0",
        "System.XML": "4.0.0.0"
      }
    }
  }
0

Actually MySql.Data is the primary .Net adapter to MySQL db. The other assembly which is MySql.Data.EF6 is the entity framework assembly which you need in case you use EF.

You can use ODBC to connect to mySQL but it would be slower, here is the link to download it & you can check all related documentation:

https://dev.mysql.com/downloads/connector/odbc/

Hope this helps.

Mostafa
  • 3,296
  • 2
  • 26
  • 43