Error when installing NuGet package 'Facebook

2019-02-26 12:16发布

When trying to install the Facebook 6.1.2 NuGet into my Windows 8 application I get the following message:

PM> Install-Package Facebook
Successfully installed 'Facebook 6.1.2'.
Successfully uninstalled 'Facebook 6.1.2'.
Install failed. Rolling back...
Install-Package : Could not install package 'Facebook 6.1.2'. You are trying to install
this package into a project that targets '.NETCore,Version=v4.5', but the package does not
contain any assembly references that are compatible with that framework. For more
information, contact the package author.

Is there anyway to fix this issue?

2条回答
Root(大扎)
2楼-- · 2019-02-26 13:10

It's possible that the Facebook 6.1.2 package is not targeted to version 4.5 of the .Net framework.

Try targetting version 4.0 in you're Windows 8 App project.

查看更多
祖国的老花朵
3楼-- · 2019-02-26 13:19

Details at https://github.com/facebook-csharp-sdk/facebook-csharp-sdk/issues/199

TLDR;

we now store the facebook.dll for win store apps in win8 folder rather than winRT45 which is only understood by nuget 2.1+. So make sure your nuget package manager is up to date.

查看更多
登录 后发表回答