代码之家  ›  专栏  ›  技术社区  ›  stefan.stt

如何升级EF核心工具

  •  26
  • stefan.stt  · 技术社区  · 6 年前

    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.
    

    除了更新DotNET核心SDK之外,我还没有找到任何关于如何更新的信息,但是这对我来说不起作用。

    1 回复  |  直到 6 年前
        1
  •  65
  •   S.Serpooshan    6 年前

    使用包管理器控制台更新工具:

    Install-Package Microsoft.EntityFrameworkCore.Tools -Version 2.1.4
    

    查看此链接 https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Tools/

        2
  •  28
  •   Luke    4 年前

    如果您使用的是命令行(CMD、Powershell、bash等),则可以轻松键入以下内容以更新到最新版本:

    dotnet tool update --global dotnet-ef
    

    dotnet tool update --global dotnet-ef --version VERSION_NUMBER
    

    例子:

    dotnet tool update --global dotnet-ef --version 3.1.0
    
        3
  •  0
  •   cminus    3 年前

    背负 daniel-chikaka 的解决方案,如果在对全局环境运行update命令后仍看到错误。

    dotnet tool update --global dotnet-ef
    

    尝试删除 --global 参数,以便更新 与项目关联的文件。

    dotnet tool update dotnet-ef