To install the dotnet-ef tool, run the following command:
.NET 8
dotnet tool install --global dotnet-ef --version 8.* .NET 7
dotnet tool install --global dotnet-ef --version 7.* .NET 6
dotnet tool install --global dotnet-ef --version 6.* .NET 5
dotnet tool install --global dotnet-ef --version 5.* .NET Core 3
dotnet tool install --global dotnet-ef --version 3.* For more information about the history of dotnet-ef, see the announcement for ASP.NET Core 3 Preview 4, which explains that this tool was changed from being built-in to requiring an explicit install:
The dotnet ef tool is no longer part of the .NET Core SDK
This change allows us to ship
dotnet efas a regular .NET CLI tool that can be installed as either a global or local tool.