由于在可移植类库中无法访问System.Net.HttpClient,因此我尝试将Nuget中的Microsoft.Net.Http软件包安装到Xamarin Studio中的HelloWorld Xamarin.Forms PCL项目,但它始终因此错误而失败: / p>
Could not install package 'Microsoft.Net.Http 2.0.20710.0'. You are trying to install this package into a project that targets 'portable-net45+wp80+MonoAndroid10+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.
根据该项目的Nuget page,它确实支持PCL。
答案 0 :(得分:0)
此处有PEBKAC错误。
在Xamarin Studio的Add Packages屏幕上,我选择了Libs而不是All Sources。切换到所有来源允许我找到合适的nuget包。