Documentation Home
MySQL Connector/NET Developer Guide
Related Documentation Download this Manual

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

3.1.3 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, integration with Entity Framework Designer (Visual Studio), or access to MySQL for Visual Studio, use MySQL Installer or 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 5.18, “ASP.NET Provider Model”). 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 9.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 9.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.


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.