Error when installing NuGet package 'Facebook 6.1.2' Windows 8 App

拜拜、爱过 提交于 2019-12-02 04:12:39

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/13480007/error-when-installing-nuget-package-facebook-6-1-2-windows-8-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!