简体   繁体   中英

Migrations in ASP.NET Core code-first not working

I used to be able to do migrations using this command

dotnet ef migrations add seedData  -p Persistence/ -s API/

But now I get an error:

在此处输入图像描述

I have looked online and I tried updating the dotnet-ef tool:

dotnet tool update --global dotnet-ef

Successfully updated
Tool 'dotnet-ef' was successfully updated from version '3.1.3' to version '3.1.6'.

I reference these packages in my project:

Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Design
Microsoft.EntityFrameworkCore.Tools

Can anyone suggest to me why my migrations are working anymore. Thanks

I had to update my sdk runtime for the migrations to work.

https://dotnet.microsoft.com/download/dotnet-core/3.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM