Package Manager console not working

37,716

Solution 1

Rather than voting to close and leaving the answer in comments, it's worth posting it as an actual answer so that others with the problem see an answered question in search results, rather than an unanswered one :-)

Copied from the comments:

restarting the computer and VS somehow fixed this issue, closing

Yes I've seen this issue before (where the NuGet module isn't loaded)

This issue is on the NuGet issue tracker, though it's closed (at the moment)

Solution 2

The solution to this problem would be:

  1. Close the Package Manager Console
  2. Close the Project
  3. Close Visual Studio
  4. Start Visual Studio
  5. Open the project again
Share:
37,716
mare
Author by

mare

Software project manager and fullstack developer at Centiva, Slovenia. Focusing on web and mobile development using open web technologies like HTML5, JavaScript/TypeScript, Svelte/Angular, REST services, document and relational databases, cloud and containers.

Updated on July 09, 2022

Comments

  • mare
    mare almost 2 years

    According to this http://docs.nuget.org/docs/start-here/using-the-package-manager-console I should see the PM prompt and commands like get-packages should work. With my VS2010 the Package Manager Console prompt says

    PS E:\myprojectfolder
    

    and none of the commands work - it issues an error saying:

    PS E:\project>  get-package -ListAvailable
    The term 'get-package' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is co
    rrect and try again.
    At line:1 char:12
    + get-package <<<<  -ListAvailable
        + CategoryInfo          : ObjectNotFound: (get-package:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    

    Any ideas?

  • Francesc Castells
    Francesc Castells over 12 years
    Thanks. Restarting VS worked for me. As it's a problem loading NuGet module, this seems to be the most valid workaround.
  • Maxime Rouiller
    Maxime Rouiller about 12 years
    It's a beta problem. Something with the powershell not loading nuget when creating a new project. It will be resolved in the Release Candidate.
  • Marcelo Mason
    Marcelo Mason about 12 years
    This works for me sometimes, other times not. I'm already at my 20th restart and are about to go insane.
  • trebormf
    trebormf over 7 years
    This is relevant even to VS 2015. The Package Manager Console was displaying "Provider Failed" and not giving me a prompt. Only restarting my computer fixed it; restarting just VS did not.