The Entity Framework tools version '3.1.7' is older than that of the runtime '5.0.3'.
When running EntityFramework commands, an warning is thrown out: The Entity Framework tools version '3.1.7' is older than that of the runtime '5.0.3'. Update the tools for the latest features and bug fixes.
The detailed error looks like the following:
The Entity Framework tools version '3.1.7' is older than that of the runtime '5.0.3'. Update the tools for the latest features and bug fixes. info: Microsoft.EntityFrameworkCore.Infrastructure Entity Framework Core 5.0.3 initialized 'ApplicationDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: MigrationsAssembly=Kontext.DependencyInjection, Version=22.214.171.124, Culture=neutral, PublicKeyToken=null Your target project 'Kontext.Web.Portals' doesn't match your migrations assembly 'Kontext.DependencyInjection, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null'. Either change your target project or change your migrations assembly. Change your migrations assembly by using DbContextOptionsBuilder. E.g. options.UseSqlServer(connection, b => b.MigrationsAssembly("***")). By default, the migrations assembly is the assembly containing the DbContext. Change your target project to the migrations project by using the Package Manager Console's Default project drop-down list, or by executing "dotnet ef" from the directory containing the migrations project.
Resolve this issue
As the error message points out, we just need to simply upgrade EF tool.
Running the following command line to update it:
dotnet tool update --global dotnet-ef
The output looks like the following text:
Verify the tool
Type the following command to verify the tool: