我正在尝试将 NuGet控制台中的facebook C#sdk安装到我的 Windows Phone 8 应用中, .NET framework 4.0 但它给出了一个错误!详情如下:
PM> Install-Package Facebook
Successfully installed 'Facebook 6.4.2'.
Successfully uninstalled 'Facebook 6.4.2'.
Install failed. Rolling back...
Install-Package : Could not install package 'Facebook 6.4.2'. You are trying to install this package into a project that
targets 'WindowsPhone,Version=v8.0', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Facebook
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
如果我尝试安装此安装包Facebook.Client -pre ,那么我也会得到同样的错误!!任何人都可以帮我解决?在此先感谢!!
答案 0 :(得分:5)
问题是你的nuget包管理器没有更新。请更新您的nuget管理器,重新启动,然后重试。它应该工作正常。