LinkMenuExpand(external link)DocumentSearchCopyCopied


The recommended way of installing MySqlConnector is through NuGet. Note that if you are using the MySql.Data NuGet package, it must be uninstalled first.


At the command line, run: dotnet add package MySqlConnector

Or, in Visual Studio, use the NuGet Package Manager to browse for and install MySqlConnector.


Step 1: Add MySqlConnector to the dependencies in your csproj file:

<Project Sdk="Microsoft.NET.Sdk">
    <AssemblyTitle>My Application</AssemblyTitle>
    <Description>A great application</Description>

    <PackageReference Include="MySqlConnector" Version="2.2.5" />


Step 2: Run the command dotnet restore