繁体   English   中英

"为什么在包管理器控制台中调用“get-help entityframework”会导致这个错误?"

[英]Why does calling "get-help entityframework" in the Package Manager Console cause this error?

PM> get-help entityframework

一旦我安装了 NuGet 包 Microsoft.EntityFrameworkCore.Tools,错误就消失了,我看到了我的列表......

PM> get-help entityframework

                 _/\__
           ---==/    \\
     ___  ___   |.    \|\
    | __|| __|  |  )   \\\
    | _| | _|   \_/ |  //|\\
    |___||_|       /   \\\/\\

TOPIC about_EntityFrameworkCore

简短说明提供有关 Entity Framework 核心包管理器控制台工具的信息。

详细说明 本主题描述了 Entity Framework Core Package Manager 控制台工具。 有关 Entity Framework Core 的信息,请参阅https://docs.efproject.net

The following Entity Framework Core commands are available.

    Cmdlet                      Description
    --------------------------  ---------------------------------------------------
    Add-Migration               Adds a new migration.

    Drop-Database               Drops the database.

    Get-DbContext               Gets information about a DbContext type.

    Remove-Migration            Removes the last migration.

    Scaffold-DbContext          Scaffolds a DbContext and entity types for a database.

    Script-DbContext            Generates a SQL script from the current DbContext. 

    Script-Migration            Generates a SQL script from migrations.

    Update-Database             Updates the database to a specified migration.

另请参见 Add-Migration Drop-Database Get-DbContext Remove-Migration Scaffold-DbContext Script-DbContext Script-Migration Update-Database

您最近是否升级了任何相关组件? 我问是因为另一个用户在 MVC 升级后看到了与 NuGet 类似的行为: https : //github.com/NuGet/Home/issues/2192

检查您的 NuGet 和实体框架包是否是最新的。

是否还有其他字符串让 get-help 返回类似错误? 如果没有,也许甚至卸载并重新安装实体框架?

安装了 NuGet 包 -> Microsoft.EntityFrameworkCore.Tools

帮助 about_entityframeworkcore

                 _/\__
           ---==/    \\
     ___  ___   |.    \|\
    | __|| __|  |  )   \\\
    | _| | _|   \_/ |  //|\\
    |___||_|       /   \\\/\\

TOPIC about_EntityFrameworkCore

简短说明提供有关 Entity Framework 核心包管理器控制台工具的信息。

详细说明 本主题描述了 Entity Framework Core Package Manager 控制台工具。 有关 Entity Framework Core 的信息,请参阅https://docs.efproject.net

The following Entity Framework Core commands are available.

    Cmdlet                      Description
    --------------------------  ---------------------------------------------------
    Add-Migration               Adds a new migration.

    Drop-Database               Drops the database.

    Get-DbContext               Gets information about a DbContext type.

    Remove-Migration            Removes the last migration.

    Scaffold-DbContext          Scaffolds a DbContext and entity types for a database.

    Script-DbContext            Generates a SQL script from the current DbContext. 

    Script-Migration            Generates a SQL script from migrations.

    Update-Database             Updates the database to a specified migration.

另请参见 Add-Migration Drop-Database Get-DbContext Remove-Migration Scaffold-DbContext Script-DbContext Script-Migration Update-Database

首先使用以下命令安装实体框架工具。

PM > Install-Package Microsoft.EntityFrameworkCore.Tools

命令行

我有同样的问题。 检查您是否安装了 Microsoft.EntityFrameworkCore.Tools 包。 我猜你没有,因为当我没有这样的包时,我遇到了同样的问题。

安装完Microsoft.EntityFrameworkCore.Tools PM> get-help entityframework 再检查一下,就会得到你想要的结果)

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM