Documentation Home
MySQL Connector/NET Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


MySQL Connector/NET Developer Guide  /  ...  /  Installing Connector/NET Using NuGet

3.1.2 Installing Connector/NET Using NuGet

MySQL Connector/NET functionality is available as packages from NuGet, an open-source package manager for the Microsoft development platform (including .NET Core). The NuGet Gallery is the central software package repository populated with the most recent NuGet packages for Connector/NET.

You can install or upgrade one or more individual Connector/NET packages with NuGet, making it a convenient way to introduce existing technology, such as Entity Framework, to your project. NuGet manages dependencies across the related packages and all of the prerequisites are listed in the NuGet Gallery. For a description of each Connector/NET package, see Connector/NET Packages (NuGet).

Important

For projects that require Connector/NET assemblies to be stored in the GAC or integration with Entity Framework Designer (Visual Studio), use the standalone MSI to install Connector/NET, rather than installing the NuGet packages.

Consuming Connector/NET Packages with NuGet

The NuGet Gallery (https://www.nuget.org/) provides several client tools that can help you install or upgrade Connector/NET packages. If you are not familiar with the tool options or processes, see Package consumption workflow to get started. After locating a package description in NuGet, confirm the following information:

  • The identity and version number of the package are correct. Use the Version History list to select the current version.

  • All of the prerequisites are installed. See the Dependencies list for details.

  • The license terms are met. See the License Info link to view this information.

Connector/NET Packages (NuGet)

Connector/NET provides the following five NuGet packages:

MySql.Data

This package contains the core functionality of Connector/NET, including using MySQL as a document store (with Connector/NET 8.0 only). It implements the required ADO.NET interfaces and integrates with ADO.NET-aware tools. In addition, the packages provides access to multiple versions of MySQL server and encapsulates database-specific protocols.

MySql.Web

The MySql.Web package includes support for the ASP.NET 2.0 provider model (see Section 6.2, “ASP.NET Provider Model and Tutorials”). This model enables you to focus on the business logic of your application, rather than having to recreate boilerplate items such as membership and roles support. The package supports the membership, role, profile, and session-state providers.

Package dependency: MySql.Data.

MySql.Data.EntityFramework

This package provides object-relational mapper (ORM) capabilities, which enables you to work with MySQL databases using domain-specific objects, thereby eliminating the need for most of the data access code. Select this package for your Entity Framework 6 applications (see Section 7.1, “Entity Framework 6 Support”).

Package dependency: MySql.Data.

MySql.Data.EntityFrameworkCore

This package is similar to the MySql.Data.EntityFramework package; however, it provides multi-platform support for Entity Framework tasks. Select this package for your Entity Framework Core applications (see Section 7.2, “Entity Framework Core Support”).

MySql.Data.EntityFrameworkCore.Design

The MySql.Data.EntityFrameworkCore.Design package includes shared design-time components for Entity Framework Core tools, which enable you to scaffold and migrate MySQL databases.

Note

Beginning with Connector/NET 8.0.20, the functionality provided in this package has been relocated to the MySql.Data.EntityFrameworkCore package. The original MySql.Data.EntityFrameworkCore.Design package is deprecated.