0

I am using Unity with Rider serverside and want to connect to Mariadab using the NuGet package "MySqlConnector(1.1.0)".

I have installed the package and can see it in the Assembly.

However: Rider does not recognize the package:

    public void Connect()
    {
        using (var connection =
            new MySqlConnection($"Server={server};User ID={userID};Password={password};Database={database}"))
        {
            connection.Open();

            using (var command = new MySqlCommand("SELECT field FROM table;", connection))
            {

                using (var reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        Console.WriteLine(reader.GetString(0));
                    }
                }
            }
        }
    }

Both constructors "MySqlConnection(...)" and "MySqlCommand(..)" are highlighted as unknown...

How can I get Rider to recognize the package and the rspective classes?

Many thx !

Rachmaninow
  • 63
  • 1
  • 9

1 Answers1

0

Rider offers a context action: install MySqlCommand. This will fix the references...

Rachmaninow
  • 63
  • 1
  • 9