简体   繁体   English

Visual Studio Pro s2017 中的 Package 管理器控制台启用-迁移 CommandNotFoundException

[英]Package Manager Console Enable-Migrations CommandNotFoundException in visual studio pro s2017

I tried to run the command 'Enable-Migrations' in the microsoft sample project https://docs.microsoft.com/en-us/ef/ef6/modeling/code-first/migrations/ with visual studio professional 2017, But I got the message:我尝试使用 Visual Studio Professional 2017 在 microsoft 示例项目https://docs.microsoft.com/en-us/ef/ef6/modeling/code-first/migrations/中运行命令“Enable-Migrations”,但我得到消息:

PM> Enable-Migrations
The term 'Enable-Migrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verif
y that the path is correct and try again.
At line:1 char:18
+ Enable-Migrations <<<< 
    + CategoryInfo          : ObjectNotFound: (Enable-Migrations:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
1、I have tried the re-starting Visual Studio and re-install EntityFramework Packages using "Install-Package EntityFramework -IncludePrerelease" but these are invalid
2、I have tried upgrade my powershell to 4.9.3.5777, but it is also invalid
3、I have tried Import-Module ProjectPath\packages\EntityFramework.6.3.0\tools\EntityFramework6.psd1,but invalid

BTW,I am using EntityFramework6.3.0.顺便说一句,我正在使用 EntityFramework6.3.0。

Did you install:你安装了吗:

Install-Package EntityFramework

I resloved the question by installing EntityFramework5.0 with .net Framework4.5.我通过使用 .net Framework4.5 安装 EntityFramework5.0 解决了这个问题。

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

相关问题 实体框架:package 管理控制台中的启用迁移不起作用 - Entity Framework: enable-migrations in package management console does not work 启用迁移在 Package 管理器控制台中不起作用 - Enable Migrations does not work in Package Manager Console 启用 - 迁移时出错 - Error on Enable-Migrations EF迁移-启用迁移 - EF Migrations - enable-migrations 使用“2”参数调用“SetData”的启用迁移异常 - Enable-Migrations Exception calling "SetData" with "2" argument(s) 实体框架启用 - 迁移 - Entity Framework Enable-Migrations 如何使用NuGet软件包管理器控制台在Visual Studio 2012 Pro上安装OpenPop.NET? - How can i install OpenPop.NET on my visual studio 2012 pro using the NuGet package manager console? 如何在MVC与2017中设置个人用户帐户和启用迁移 - how set individual user accounts and enable-migrations in mvc vs 2017 在扩展中以编程方式访问visual studio的powershell控制台(包管理器控制台) - Access the powershell console (package manager console) of visual studio programmatically in an extension EntityFramework 6.1.3 enable-migrations“无法实例化主机指定的域管理器” - EntityFramework 6.1.3 enable-migrations “The domain manager specified by the host could not be instantiated”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM