【发布时间】:2015-11-12 17:54:47
【问题描述】:
我尝试将 Signalr Client library 和 WebApi client 包添加到我的 Xamarin 解决方案(在具有 Xamarin 支持的 Visual Studio 和 Xamarin Studio 上)但我总是收到此错误,尽管我能够安装其他 PCL(对于例如 Microsoft.Net.Http):
Could not install package 'Microsoft.AspNet.WebApi.Client 5.2.3'. You are trying to install this package into a project that targets 'portable-net45+sl50+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
以及添加 Signalr 时出现以下错误:
Adding Microsoft.AspNet.SignalR.Client...
Adding 'Microsoft.AspNet.SignalR.Client 2.2.0' to Corda.Client.
Could not install package 'Microsoft.AspNet.SignalR.Client 2.2.0'. You are trying to install this package into a project that targets 'portable-net45+sl50+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
我也尝试过更改目标框架但没有成功。 这是我的项目的构建设置:
这是我的 C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.5\Profile\Profile259\SupportedFrameworks 文件夹:
我在 Mac OSX 和 Windows 10 上遇到相同的错误。有什么想法吗?
【问题讨论】:
标签: c# xamarin xamarin.ios xamarin.android portable-class-library