MySqlConnector


Installing

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.

Automatically

If using the new project system, run: dotnet add package MySqlConnector

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

Manually

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

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <AssemblyTitle>My Application</AssemblyTitle>
    <Description>A great application</Description>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="MySqlConnector" Version="0.61.0" />
  </ItemGroup>

</Project>

Step 2: Run the command dotnet restore