开发者

Package Manager console not working

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 开发者_C百科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?


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)


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


I was using Package Manager Console for installing a package and was getting this error. Strangely by using the Nuget Package Manager UI did not generate this error and the problem was solved.


the solution is:

  1. open visual sutido
  2. open the package manager console
  3. use the file menu open your project
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜