2
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
CyberEgo
  • 46
  • 1
  • 8
  • You probaply mean `Get-Help about_EntityFrameworkCore` Get-Help is meticulous, but you can insert the `*` wildcard `Get-Help about_Entity*` –  Nov 22 '18 at 17:31
  • "get-help nuget" or other similar commands give me a similar errors – CyberEgo Nov 22 '18 at 17:38
  • I presume that it supposed to work from any provider/location, but what happens when you change the location: [`Set-Location C:`](https://learn.microsoft.com/powershell/module/microsoft.powershell.management/set-location?view=powershell-6)? – iRon Nov 22 '18 at 19:08
  • @iRon sorry but Set-Location is not relevant to this problem – CyberEgo Nov 23 '18 at 12:09

5 Answers5

5

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

Mario Levesque
  • 1,017
  • 13
  • 13
2

Install Entity Framework Tools first by using the below command.

PM > Install-Package Microsoft.EntityFrameworkCore.Tools

Command line

TERMINATOR
  • 1,180
  • 1
  • 11
  • 24
0

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?

0

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

0

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)

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 29 '22 at 04:02