1

I am testing logging in via Facebook on sample project. 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

Install-Package Facebook -Version 7.0.6

or

Install-Package Facebook

I instead get the following errors respectively (which show the package doesn't exist )

install-package : Unable to find package 'Facebook'.

and

Install-Package : Unable to find version '7.0.6' of package 'Facebook'.

However when I use Manage Nuget Packages from Tools Menu and search for Facebook, I get the package. What really is wrong?

Community
  • 1
  • 1
Dennis Wanyonyi
  • 368
  • 1
  • 5
  • 18
  • Check this link http://stackoverflow.com/questions/11036060/install-c-sharp-library-without-the-package-manager-console – jamiedanq Apr 25 '16 at 18:11
  • 1
    Am using Visual Studio 2013 Community and unlike that post, I have PMC. When I was unable to install through PMC, I just used the Manage Nuget Packages dialog and installed. My question rather is **why is searching for the packages through the PMC command line not returning results when the packages exist?** – Dennis Wanyonyi Apr 25 '16 at 19:22
  • What do you have your package source set to. Needs to be nuget.org to get the facebook SDK – pool pro Apr 26 '16 at 19:50
  • Try setting Package source to nuget.org and do a search for it. PM> Find-Package facebook – pool pro Apr 26 '16 at 19:56
  • The command is `Install-Package` though and not `Find-Package` – Dennis Wanyonyi Apr 26 '16 at 20:47

1 Answers1

1

You can select Package source differently for the GUI and the Console. Try setting Console to nuget.org or all. Then do a search for your package: PM> Find-Package facebook and you should get the following results as in the Image below.

enter image description here

pool pro
  • 2,084
  • 12
  • 21
  • I tried changing the package source from `nuget.org` to `Microsoft and .Net` and the package installed on a sample project. Seems all you have to do is set package source to All or for this particular case to `Microsoft and .Net`. Thanks. – Dennis Wanyonyi Apr 26 '16 at 20:45