.net core执行dotnet ef migrations createmodel等命令出错
.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等命令出错的更多相关文章
- EntityFramework Core 运行dotnet ef命令迁移背后本质是什么?(EF Core迁移原理)
前言 终于踏出第一步探索EF Core原理和本质,过程虽然比较漫长且枯燥乏味还得反复论证,其中滋味自知,EF Core的强大想必不用我再过多废话,有时候我们是否思考过背后到底做了些什么,到底怎么实现的 ...
- 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 ...
- .net core 2.0 dbfirst 报 dotnet ef 未找到与命令“dotnet-ef”匹配的可执行文件的解决办法
问题描述: 最近研究了一段时间.netcore dbfirst,新建类库用来生成实体模型,执行命令总是提示 未找到与命令“dotnet-ef”匹配的可执行文件,根据网上的解决办法引用 Microsof ...
- dotnet ef执行报错, VS 2019发布时配置项中的Entity Framework迁移项显示不出来
VS 2019发布时配置项中的Entity Framework迁移项显示不出来 dotnet ef dbcontext list --json “无法执行,因为找不到指定的命令或文件.可能的原因包括: ...
- asp.net core系列 30 EF管理数据库架构--必备知识 迁移
一.管理数据库架构概述 EF Core 提供两种主要方法来保持 EF Core 模型和数据库架构同步.一是以 EF Core 模型为基准,二是以数据库为基准. (1)如果希望以 EF Core 模型为 ...
- Asp.net core 学习笔记 ( ef core )
更新 : 2018-11-26 这里记入一下关于 foreignKey cascade action 默认情况下如果我们使用 data annotation required + foreginkey ...
- ASP.NET Core中使用EF Core(MySql)Code First
⒈添加依赖 MySql.Data.EntityFrameworkCore ⒉在appsettings.json配置文件中配置数据库连接字符串 { "Logging": { &quo ...
- EF Core 迁移过程遇到EF Core tools version版本不相符的解决方案
如果你使用命令: PM> add-migration Inital 提示如下信息时: The EF Core tools version '2.1.1-rtm-30846' is older t ...
- dotnet ef
dotnet ef migrations add <Name-of-Migration> dotnet ef database update
随机推荐
- svn can't save server certificate
f I use any svn command communicating with the remote server I get the following error: Error valida ...
- $(function(){})理解
$(function(){}) = jQuery(function(){}) = jQuery(document).ready(function(){ });
- Maven(四-2) Maven pom.xml 配置详解
转载于:http://niuzhenxin.iteye.com/blog/2042102 什么是pom? pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述 ...
- 转化RGB颜色为CMYK颜色
procedure RGBTOCMYK(R : byte; G : byte; B : byte; var C : byte; var M : byte; var Y : byte; var K : ...
- 小学生轻松做题App
作业链接:https://edu.cnblogs.com/campus/fzzcxy/2016SE/homework/2180 原型模型设计工具:墨刀 原型模型链接:https://modao.cc/ ...
- css常用属性总结:背景background上篇
1.在前面一节中我们提到了color的使用,类似于前景色,我们同样可以为元素的背景声明颜色,可以使用background-color属性, 它接受任何有效的颜色值.先看看它的语法. backgroun ...
- 新手C#类、对象、字段、方法的学习2018.08.05
类:具有相似属性和方法的对象的集合,如“人”是个类. 对象(实例):对象是具体的看得见摸得着的,如“张三”是“人”这个类的对象.(new Person()开辟了堆空间中,=开辟了栈空间,变量P存放在该 ...
- socket & pipe note
[socket & pipe note] 1.socket类型 2.大小端 3.socketpair 如何创建全双工管道? 直接的办法当然是pipe两次,创建两组管道,但是有没有更简单的呢? ...
- Codeforces Beta Round #9 (Div. 2 Only) D. How many trees? dp
D. How many trees? 题目连接: http://www.codeforces.com/contest/9/problem/D Description In one very old t ...
- Spring IoC底层原理
-------------------siwuxie095 Spring IoC 底层原理 1.IoC 即 Invers ...