RestSharp 不支持 Windows Phone 8 吗? [英] Does RestSharp not support Windows Phone 8?

查看:70
本文介绍了RestSharp 不支持 Windows Phone 8 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直使用 RestSharp 来处理 Windows Phone 7 & 上的异步请求.7.8 应用程序,但今天,我试图将 RestSharp 添加到 Windows Phone 8 应用程序,但它不起作用.这是收到的错误:

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:

安装包:无法安装包RestSharp 104.1".您正在尝试将此包安装到一个将WindowsPhone,Version = v8.0"作为项目目标的包中,但此包不包含任何与框架程序集兼容的引用

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

推荐答案

我通过使用适用于 .NET Framework 和 Windows Phone 的便携式 HttpClient 来处理 HTTP 请求

I got HTTP requests working by using a Portable HttpClient for .NET Framework and Windows Phone

它的最新版本发布于 2/18/2013,可以使用 NuGet 包管理器将其包含在项目中.

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

安装完毕

using System.Net.Http;

现在已被识别.

这篇关于RestSharp 不支持 Windows Phone 8 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆