包管理器控制台不工作
根据此 http://docs.nuget.org/docs/start-here /using-the-package-manager-console 我应该看到 PM 提示,并且像 get-packages
这样的命令应该可以工作。在我的 VS2010 中,程序包管理器控制台提示说
PS E:\myprojectfolder
,所有命令都不起作用 - 它会发出错误:
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
有什么想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
与其投票结束并将答案留在评论中,不如将其作为实际答案发布,以便其他有问题的人在搜索结果中看到已回答的问题,而不是未回答的问题:-)
从评论中复制:
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:
此问题的解决方案是:
The solution to this problem would be:
我正在使用包管理器控制台安装包并收到此错误。奇怪的是,使用 Nuget Package Manager UI 并没有生成此错误,并且问题得到了解决。
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: