JetBrains Rider 2024.3 Help

Visual interface for EF Core commands

In Entity Framework Core projects — projects where Microsoft.EntityFrameworkCore.* 5.0.0 or later is installed — JetBrains Rider helps execute dotnet EF Core commands using a visual interface. Each command has a dedicated dialog that provides fields for most arguments that are allowed, autofills most of them, and ensures that all required arguments are specified and valid.

This functionality is a visual wrapper around the dotnet ef command; therefore, first you need to make sure that the corresponding dotnet tool is installed and available.

When you open a solution with at least one EF Core project, JetBrains Rider will check whether the dotnet ef is available as a local or as global tool (dotnet ef 5.0 or later is required). If not, it will prompt you to install the latest version as a global tool.

JetBrains Rider: Install dotnet ef

You can also install any other version using the corresponding command, for example:

dotnet tool install --global dotnet-ef

Execute EF Core commands

  • Select Tools | Entity Framework Core | [command name] from the main menu.

  • Right-click the desired project in the Solution Explorer and choose Entity Framework Core | [command name].

The details of specific EF Core commands are described in the dedicated topics:

Prerequisites

  • Target frameworks: netcoreapp3.1 and later for the Startup project, and netstandard2.1 and later for the Migrations project.

  • EF Core packages: Microsoft.EntityFrameworkCore.* 5.0.0 or later.

  • Tools: dotnet ef 5.0 or later.

Troubleshooting

Project does not appear in the 'Startup projects' field

Check that the desired project satisfies the following requirements:

  • Microsoft.EntityFrameworkCore.Design or Microsoft.EntityFrameworkCore.Tools NuGet package is installed.

  • Project's target framework is at least netcoreapp3.1.

dotnet ef tools installed globally are not working from the terminal

If you see the following message:

Could not execute because the specified command or file was not found. Possible reasons for this include: * You misspelled a built-in dotnet command. * You intended to execute a .NET program, but dotnet-xyz does not exist. * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

Make sure that .dotnet/tools folder is included in the PATH environment variable. For more information, see this troubleshooting guide.

On Windows, you can also run the .NET SDK installer with the 'Repair' option.

Last modified: 22 March 2024