程序包管理器控制台不起作用 [英] Package Manager console not working

查看:272
本文介绍了程序包管理器控制台不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此 http://docs.nuget.org/docs/从这里开始/使用软件包管理器控制台,我应该看到PM提示符,并且像get-packages这样的命令应该可以工作.在我的VS2010中,程序包管理器控制台提示会显示

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

有什么想法吗?

推荐答案

值得将其作为实际答案发布,而不是投票关闭并在评论中留下答案,以便其他有问题的人在搜索结果中看到已回答的问题,而不是没有答案的:-)

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

从评论中复制:

重新启动计算机,VS以某种方式解决了该问题,关闭了

restarting the computer and VS somehow fixed this issue, closing

是的,我之前曾见过此问题(未加载NuGet模块)

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

此问题位于 NuGet问题跟踪器(尽管目前已关闭)

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

这篇关于程序包管理器控制台不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆