zoukankan      html  css  js  c++  java
  • *你打算执行 .NET Core 程序,但 dotnet-ef 不存在。

    .NET做数据迁移安装dotnet -ef命令工具

    可能的原因包括:
      *你拼错了内置的 dotnet 命令。
      *你打算执行 .NET Core 程序,但 dotnet-ef 不存在。
      *你打算运行全局工具,但在路径上找不到名称前缀为 dotnet 的可执行文件。

    .net core3.0 以上版本dotnet ef命令不在是sdk的一部分,需要单独安装,使用如下命令:(最新版)

    dotnet tool install --global dotnet-ef

    该命令默认安装的是最新版本,如果项目中使用的并不是最新版本,则还是不能使用,安装对应版本使用如下命令:(指定版本)

    dotnet tool install --global dotnet-ef --version 3.1.1

    不注意安装错误可使用卸载命令:

    dotnet tool uninstall --global dotnet-ef

    dotnet-ef安装成功后,还需要给项目引用nuget包:

    dotnet add package Microsoft.EntityFrameworkCore.Design

    操作失败的话检查一下版本号即可

  • 相关阅读:
    jQuery 选择器
    http statusCode(状态码)含义
    JS实现拖拽效果
    Sql Service中的分页
    SQL Server中一些不常见的查询
    游标的基本写法
    doT.js
    关于GridView中控件的问题
    Sql Server创建函数
    ASP.NET中Ajax的用法
  • 原文地址:https://www.cnblogs.com/GarsonZhang/p/13916428.html
Copyright © 2011-2022 走看看