相关疑难解决方法(0)

如何升级EF Core Tools

当我add-migration收到这个警告时:

The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.4-rtm-31024'. Update the tools for the latest features and bug fixes.
Run Code Online (Sandbox Code Playgroud)

我没有找到任何信息如何更新这个,除了更新DotNET核心SDK,但这对我没有用.

entity-framework asp.net-core

36
推荐指数
2
解决办法
1万
查看次数

EF Core工具版本更新2.1.1

如果我跑 dotnet ef add testmigration

我收到这个警告: The EF Core tools version '2.1.0-rtm-30799' is older than that of the runtime '2.1.1-rtm-30846'. Update the tools for the latest features and bug fixes.

所以我检查了我的csproj文件:

<ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)

这对我来说是正确的,版本2.1.1.所以我在这里检查了文档

他们建议csproj中的工具条目需要有这个包:

<ItemGroup>
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.1.1" />
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)

现在dotnet restore抱怨说:

warning : The tool 'Microsoft.EntityFrameworkCore.Tools.DotNet' is now included in the .NET Core SDK. Information on resolving this …

entity-framework .net-core ef-core-2.1

16
推荐指数
1
解决办法
2万
查看次数