问题
I've always used RestSharp to handle async requests on Windows Phone 7 & 7.8 applications, but today, I was trying to add RestSharp to a Windows Phone 8 application and it wouldn't work. This is the error received:
Install-Package: Unable to install the package "RestSharp 104.1". You are attempting to install this package to a will "WindowsPhone, Version = v8.0" as the target of the project, but this package does not contain any compatible with the framework assembly references
回答1:
I got HTTP requests working by using a Portable HttpClient for .NET Framework and Windows Phone
The last version of it was published on 2/18/2013 and it can be included in the project using the NuGet package manager.
You can find details at the following link:
http://blogs.msdn.com/b/bclteam/archive/2013/02/18/portable-httpclient-for-net-framework-and-windows-phone.aspx
Having installed it
using System.Net.Http;
is now recognized.
来源:https://stackoverflow.com/questions/16852256/does-restsharp-not-support-windows-phone-8