简体   繁体   English

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

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

PM> get-help entityframework

Once I installed the NuGet package Microsoft.EntityFrameworkCore.Tools, the error went away and i saw my list...一旦我安装了 NuGet 包 Microsoft.EntityFrameworkCore.Tools,错误就消失了,我看到了我的列表......

PM> get-help entityframework PM> get-help entityframework

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

TOPIC about_EntityFrameworkCore TOPIC about_EntityFrameworkCore

SHORT DESCRIPTION Provides information about the Entity Framework Core Package Manager Console Tools.简短说明提供有关 Entity Framework 核心包管理器控制台工具的信息。

LONG DESCRIPTION This topic describes the Entity Framework Core Package Manager Console Tools.详细说明 本主题描述了 Entity Framework Core Package Manager 控制台工具。 See https://docs.efproject.net for information on Entity Framework Core.有关 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.

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

Have you recently upgraded any related components?您最近是否升级了任何相关组件? I ask because another user saw similar behaviour with NuGet after an MVC upgrade: https://github.com/NuGet/Home/issues/2192我问是因为另一个用户在 MVC 升级后看到了与 NuGet 类似的行为: https : //github.com/NuGet/Home/issues/2192

Check that your NuGet and Entity Framework packages are up-to-date.检查您的 NuGet 和实体框架包是否是最新的。

Are there any other strings for which get-help returns a similar error?是否还有其他字符串让 get-help 返回类似错误? If not, perhaps go so far as to uninstall and reinstall Entity Framework?如果没有,也许甚至卸载并重新安装实体框架?

Installed the NuGet package -> Microsoft.EntityFrameworkCore.Tools安装了 NuGet 包 -> Microsoft.EntityFrameworkCore.Tools

help about_entityframeworkcore帮助 about_entityframeworkcore

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

TOPIC about_EntityFrameworkCore TOPIC about_EntityFrameworkCore

SHORT DESCRIPTION Provides information about the Entity Framework Core Package Manager Console Tools.简短说明提供有关 Entity Framework 核心包管理器控制台工具的信息。

LONG DESCRIPTION This topic describes the Entity Framework Core Package Manager Console Tools.详细说明 本主题描述了 Entity Framework Core Package Manager 控制台工具。 See https://docs.efproject.net for information on Entity Framework Core.有关 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.

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

Install Entity Framework Tools first by using the below command.首先使用以下命令安装实体框架工具。

PM > Install-Package Microsoft.EntityFrameworkCore.Tools

命令行

I had the same problem.我有同样的问题。 Check whether you have Microsoft.EntityFrameworkCore.Tools package installed.检查您是否安装了 Microsoft.EntityFrameworkCore.Tools 包。 I guess you don't have, because I had the same problem when I did not have such package.我猜你没有,因为当我没有这样的包时,我遇到了同样的问题。

After installing Microsoft.EntityFrameworkCore.Tools PM> get-help entityframework Check it again, you will get the result you wanted)安装完Microsoft.EntityFrameworkCore.Tools PM> get-help entityframework 再检查一下,就会得到你想要的结果)

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

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