Adding Entity Framework Core dependencies for .NET Core 3.0 previews

This guide is written before the official release of .NET Core 3.0, and it will stop being relevant once a stable version appears.

If you are trying to work with the .NET Core 3.0 previews, one problem you might run into is installing NuGet packages from external providers. Since .NET Core 3.0 hasn’t been released yet, you will not find version that are fully compatible with the previews yet.

If you are trying to work with Entity Framework Core, the latest version you can download right now is 2.2.2; while you will be able to install the package, regular actions like creating migrations will not be possible, due to compatibility issues.

If you go to the EntityFramework NuGet packages page, however, you will be able to find the latest preview build.

Choose the latest package from the list and install it as you would normally install a NuGet package:

Install-Package Microsoft.EntityFrameworkCore -Version 3.0.0-preview3.19153.1

or, from the CLI:

dotnet add package Microsoft.EntityFrameworkCore --version 3.0.0-preview3.19153.1

For working with Entity Framework Core at design time, which is needed for creating migrations, you will also need the Microsoft.EntityFrameworkCore.Design package:

Install-Package Microsoft.EntityFrameworkCore.Design -Version 3.0.0-preview3.19153.1

or, from the CLI:

dotnet add package Microsoft.EntityFrameworkCore.Design --version 3.0.0-preview3.19153.1

About Mircea Oprea

Mircea Oprea is a software developer based in Denmark, interested in API design, graphics programming, and Agile methodologies. He enjoys discovering and exploring new technologies, a passion that resulted in projects and articles that can be found on www.mirceaoprea.net.

View all posts by Mircea Oprea →