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

PM> get-help entityframework

get-help : Object reference not set to an instance of an object.
At line:1 char:1
+ get-help entityframework
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-Help], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.GetHelpCommand

I guess it might be a problem related to PowerShell so I've listed its version number here

PM> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      0      10586  494     

And I'm using

Microsoft Visual Studio Community 2017
Version 15.8.7


Solution 1:[1]

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

Solution 2:[2]

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?

Solution 3:[3]

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

Solution 4:[4]

Install Entity Framework Tools first by using the below command.

PM > Install-Package Microsoft.EntityFrameworkCore.Tools

Command line

Solution 5:[5]

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)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mario Levesque
Solution 2 Peter Whittaker
Solution 3 santi000001
Solution 4 TERMINATOR
Solution 5 NodirbekCSdevv