简体   繁体   English

包管理器控制台找不到现有包

[英]Package Manager Console does not find an existing package

I am testing logging in via Facebook on sample project.我正在测试通过 Facebook 登录示例项目。 In order to retrieve the email address of a logged in user from Facebook, I need to install Facebook package as per the accepted answer in this SO post I try to install the package by trying these two PMC commands为了从 Facebook 检索登录用户的电子邮件地址,我需要按照此 SO 帖子中接受的答案安装 Facebook 软件包我尝试通过尝试这两个 PMC 命令来安装该软件包

Install-Package Facebook -Version 7.0.6安装包 Facebook -Version 7.0.6

or或者

Install-Package Facebook安装包 Facebook

I instead get the following errors respectively (which show the package doesn't exist )我分别收到以下错误(显示包不存在)

install-package : Unable to find package 'Facebook'.安装包:无法找到包“Facebook”。

and

Install-Package : Unable to find version '7.0.6' of package 'Facebook'.安装包:无法找到包“Facebook”的版本“7.0.6”。

However when I use Manage Nuget Packages from Tools Menu and search for Facebook, I get the package.但是,当我使用“工具菜单”中的“管理 Nuget 包”并搜索 Facebook 时,我得到了包。 What really is wrong?究竟有什么问题?

You can select Package source differently for the GUI and the Console.您可以为 GUI 和控制台选择不同的包源。 Try setting Console to nuget.org or all .尝试将 Console 设置为nuget.orgall Then do a search for your package: PM> Find-Package facebook and you should get the following results as in the Image below.然后搜索你的包裹: PM> Find-Package facebook ,你应该得到如下图所示的结果。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM