包管理器控制台不工作

发布于 2024-11-27 08:28:37 字数 847 浏览 0 评论 0原文

根据此 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

洋洋洒洒 2024-12-04 08:28:37

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

从评论中复制:

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

是的,我以前见过这个问题(NuGet 模块未加载)

此问题位于 NuGet 问题跟踪器 上,但它已关闭(目前)< /p>

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)

勿忘初心 2024-12-04 08:28:37

此问题的解决方案是:

  1. 关闭包管理器控制台
  2. 关闭项目
  3. 关闭 Visual Studio
  4. 启动 Visual Studio
  5. 再次打开项目

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
别忘他 2024-12-04 08:28:37

我正在使用包管理器控制台安装包并收到此错误。奇怪的是,使用 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.

┾廆蒐ゝ 2024-12-04 08:28:37

解决方案是:

  1. 打开 Visual sutido
  2. 打开包管理器控制台
  3. 使用文件菜单打开您的项目

the solution is:

  1. open visual sutido
  2. open the package manager console
  3. use the file menu open your project
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文