Dean Beckerton
Dean Beckerton

Reputation: 307

How to use MySQL for .NET Core Azure functions

I am attempting to write an Azure function and use MySQL but I cannot seem to use the MySQL.Data or MySql.Data.MySqlClient directives. The error I am getting is the following:

The type or namespace name 'MySql' could not be found.

I am not sure what I need to make this work

using MySql.Data; 
using MySql.Data.MySqlClient;

Upvotes: 0

Views: 314

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222582

This seems to be either Nuget/Project type issue. Try the following,

  1. use NuGet to download the latest version. Just right click on the project and click 'Manage NuGet Packages' then search online for MySql.Data and install.

Check the project or create a new project

  1. To change your project's framework right-click on your project select Properties -> Application -> Target framework.

Upvotes: 2

Related Questions