core ef中执行数据库迁移无效
电脑版发表于:2020/12/23 9:35
是因为差一个依赖项 Microsoft.EntityFrameworkCore.Tools
下载即可:
nuget命令:Install-Package Microsoft.EntityFrameworkCore.Tools 3.1.1
或者使用ItemGroup添加依赖:
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.10"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference>