How do I get MySQL.Data working on Rider?

772 views Asked by At

I have recently started exploring Linux (Ubuntu) and I want to port over some F# programs I wrote for Windows.

I need to connect to MariaDB so, in rider, I installed the Nuget package called 'MySql.Data' version 6.9.9.

However, Rider tells me that 'the type MySqlConnection is not defined'.

At the top of my module I have

open MySql.Data.MySqlClient

And later on I have

use conn = new MySqlConnection(connString)

I have not made any edits to this code at all, and it runs just fine on Windows, compiles just fine on Visual Studio.

Any ideas?

1

There are 1 answers

0
Chechy Levas On

Okay, I found the solution. Apparently I needed to add a reference to System.Configuration and System.Data. As soon as I did that the MySql types were recognized.