.net core执行dotnet ef migrations createmodel等命令出错

  执行dotnet ef migrations createmodel、dotnet ef migrations add initial等命令出错,报错信息为:No project was found. Change the current working directory or use the --project option.命令出错。个人百度.net core、dotnet ef migrations createmodel、dotnet ef migrations add initial、No project was found. Change the current working directory or use the --project option关键字都未发现这个问题的解决办法,最后使用必应国内版,搜索No project was found. Change the current working directory or use the --project option.关键字,得到了解决办法。

  第一种:dotnet ef migrations add InitialCreate --project="C:\path_to_my_project\MyProject.csproj"   使用这样的命令操作,在我写的代码没有作用,依然报出之前的问题;

  第二种:PM> cd "D:{path_to_your_projet}"  PM> dotnet ef migrations add initial 使用第二种方法解决了,不可以使用dotnet ef migrations createmodel、dotnet ef migrations add initial命令的问题。

  参考文章:Stack Overflow  GitHub

.net core执行dotnet ef migrations createmodel等命令出错的更多相关文章

  1. EntityFramework Core 运行dotnet ef命令迁移背后本质是什么?(EF Core迁移原理)

    前言 终于踏出第一步探索EF Core原理和本质,过程虽然比较漫长且枯燥乏味还得反复论证,其中滋味自知,EF Core的强大想必不用我再过多废话,有时候我们是否思考过背后到底做了些什么,到底怎么实现的 ...

  2. Cookies 初识 Dotnetspider EF 6.x、EF Core实现dynamic动态查询和EF Core注入多个上下文实例池你知道有什么问题? EntityFramework Core 运行dotnet ef命令迁移背后本质是什么?(EF Core迁移原理)

    Cookies   1.创建HttpCookies Cookie=new HttpCookies("CookieName");2.添加内容Cookie.Values.Add(&qu ...

  3. .net core 2.0 dbfirst 报 dotnet ef 未找到与命令“dotnet-ef”匹配的可执行文件的解决办法

    问题描述: 最近研究了一段时间.netcore dbfirst,新建类库用来生成实体模型,执行命令总是提示 未找到与命令“dotnet-ef”匹配的可执行文件,根据网上的解决办法引用 Microsof ...

  4. dotnet ef执行报错, VS 2019发布时配置项中的Entity Framework迁移项显示不出来

    VS 2019发布时配置项中的Entity Framework迁移项显示不出来 dotnet ef dbcontext list --json “无法执行,因为找不到指定的命令或文件.可能的原因包括: ...

  5. asp.net core系列 30 EF管理数据库架构--必备知识 迁移

    一.管理数据库架构概述 EF Core 提供两种主要方法来保持 EF Core 模型和数据库架构同步.一是以 EF Core 模型为基准,二是以数据库为基准. (1)如果希望以 EF Core 模型为 ...

  6. Asp.net core 学习笔记 ( ef core )

    更新 : 2018-11-26 这里记入一下关于 foreignKey cascade action 默认情况下如果我们使用 data annotation required + foreginkey ...

  7. ASP.NET Core中使用EF Core(MySql)Code First

    ⒈添加依赖 MySql.Data.EntityFrameworkCore ⒉在appsettings.json配置文件中配置数据库连接字符串 { "Logging": { &quo ...

  8. EF Core 迁移过程遇到EF Core tools version版本不相符的解决方案

    如果你使用命令: PM> add-migration Inital 提示如下信息时: The EF Core tools version '2.1.1-rtm-30846' is older t ...

  9. dotnet ef

    dotnet ef migrations add <Name-of-Migration> dotnet ef database update

随机推荐

  1. Oracle 性能调优之:使用 V$SQL_PLAN 视图查询内存中的执行计划

    V$SQL_PLAN视图提供了一种方法,可用于检查仍位于库高速缓存的游标的执行计划.此视图中的信息与 PLAN_TABLE 视图中的信息非常类似.但是,EXPLAIN PLAN 显示的是执行相应语句时 ...

  2. eclipse 创建dynamic web project不能运行

    按照李刚<轻量级java ee企业应用实战>第三版,第二章的配置,发现eclipse 创建dynamic web project不能运行,原来作者第二章时还不是在eclipse中开发的,只 ...

  3. python值解析excel

    原文:http://blog.csdn.net/tomatoandbeef/article/details/52253578 一.安装python和xlrd模块 python下载地址,安装好后要配置环 ...

  4. leetcode190

    public class Solution { public uint reverseBits(uint n) { var list = new List<uint>();//逆序的二进制 ...

  5. c语言实现常见字符串函数strchr strstr strcmp atoi itoi(字符串换成整数)

    好久没有更新博客了,刚刚出炉练练手的程序如下,很简单,没有考虑过多复杂的东西,有好的想法,欢迎指教: 字符查找函数: char *my_strchr(const char *s,int c) { ch ...

  6. IP地址工具类

    /// <summary> /// 获取客户端IP地址 /// </summary> /// <returns></returns> public st ...

  7. 41. First Missing Positive (HashTable)

    Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0]  ...

  8. ios Https问题

    HTTPS认证过程:   ① 浏览器发送一个连接请求给安全服务器.   ② 服务器将自己的证书,以及同证书相关的信息发送给客户浏览器.   ③ 客户浏览器检查服务器送过来的证书是否是由自己信赖的 CA ...

  9. IDEA00 IDEA知识点汇总

    一.从头搭建IDEA开发环境 https://mp.weixin.qq.com/s/6jXHzkU8JfubhDsQJbwl8Q 1 下载最新版IDEA 1.1 官网下载安装 1.2 专业版激活 2 ...

  10. jQuery的基本事件

    1.用法 <!--jquery通过bind()这个方法来为元素绑定事件,可以传三个参数,type.data.fn--> <!--type表示一个或者多个事件的名称--> < ...