当我在 VS 2017 包管理器控制台中使用 dotnet ef 工具时,会出现一个关于需要更新 EF Core 工具的警告信息:
PM> dotnet ef migrations list -s ../RideMonitorSite
The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.2-rtm-30932'. Update the tools for the latest features and bug fixes.
20180831043252_Initial
但是我的csproj文件中有这个条目:
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.1.2" />
</ItemGroup>
我确认安装的版本实际上已经过时:
PM> dotnet ef --version
Entity Framework Core .NET Command-line Tools
2.1.1-rtm-30846
那么我该怎么更新工具呢?顺便说一下,我在其他答案中看到过,过时的 global.json 文件可能会导致这个问题。但是我在解决方案中找不到任何 global.json 文件。