简体   繁体   中英

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...

PM> get-help entityframework

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

TOPIC about_EntityFrameworkCore

SHORT DESCRIPTION Provides information about the Entity Framework Core Package Manager Console Tools.

LONG DESCRIPTION This topic describes the Entity Framework Core Package Manager Console Tools. See https://docs.efproject.net for information on Entity Framework Core.

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

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

Check that your NuGet and Entity Framework packages are up-to-date.

Are there any other strings for which get-help returns a similar error? If not, perhaps go so far as to uninstall and reinstall Entity Framework?

Installed the NuGet package -> Microsoft.EntityFrameworkCore.Tools

help about_entityframeworkcore

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

TOPIC about_EntityFrameworkCore

SHORT DESCRIPTION Provides information about the Entity Framework Core Package Manager Console Tools.

LONG DESCRIPTION This topic describes the Entity Framework Core Package Manager Console Tools. See https://docs.efproject.net for information on Entity Framework Core.

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

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. 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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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