简体   繁体   English

启用迁移在 Package 管理器控制台中不起作用

[英]Enable Migrations does not work in Package Manager Console

I installed EF in my soluton:我在我的解决方案中安装了 EF:

PM> Install-Package EntityFramework -IncludePrerelease

After that, I am trying to execute enable migration command, but it does not work:之后,我尝试执行启用迁移命令,但它不起作用:

PM> enable-migrations

Error:错误:

No context type was found in the assembly 'MyProjectName'.

从下拉菜单Default Project中指定目标项目(具有DbContext派生类),或者:

PM> enable-migrations -Project <MyProjectName>

try this command may help.试试这个命令可能会有帮助。

EntityFrameworkCore\enable-migrations EntityFrameworkCore\启用迁移

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 实体框架:package 管理控制台中的启用迁移不起作用 - Entity Framework: enable-migrations in package management console does not work Visual Studio Pro s2017 中的 Package 管理器控制台启用-迁移 CommandNotFoundException - Package Manager Console Enable-Migrations CommandNotFoundException in visual studio pro s2017 如何在程序包管理器中执行迁移? - How to perform migrations in the package manager? 启用迁移无效 - Enable Migrations doesn't work 卡在 asp.net 核心教程中。 尝试使用 package 管理器控制台添加 EF Core SQL 服务器提供程序不起作用 - Stuck in asp.net core tutorial. Trying to use package manager console to add EF Core SQL Server provider does not work Package 管理器看不到 sql 服务器并且不创建迁移。 解决办法是什么? - Package manager does not see sql server and does not create migrations. What is the solution? Package 管理器控制台如何知道要使用哪个连接字符串? - How does Package Manager Console know which connection string to use? 实体框架包管理器控制台问题 - Entity Framework Package Manager Console question 无法打开 NuGet 包管理器控制台 - Unable to open the NuGet Package Manager Console 软件包管理器控制台卡在依赖信号SignalR上 - Package Manager Console Stuck on Dependencies SignalR
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM