无法找到该DLL参考“HttpContent” [英] Can't find the DLL reference for 'HttpContent'

查看:132
本文介绍了无法找到该DLL参考“HttpContent”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 HttpContent

HttpContent myContent = HttpContent.Create(SOME_JSON);

...但我没有任何运气找到定义它的DLL。

...but I am not having any luck finding the DLL where it is defined.

首先,我尝试添加引用 Microsoft.Http 以及 System.Net ,但也不是在列表。我也尝试添加一个参考 System.Net.Http HttpContent 类是不可用的。

First, I tried adding references to Microsoft.Http as well as System.Net, but neither is in the list. I also tried adding a reference to System.Net.Http but the HttpContent class is not available.

那么,谁能告诉我哪里可以找到 HttpContent 类?

So, can anyone tell me where I can find the HttpContent class?

推荐答案

类的被列为 System.Net.Http 组装是present 。请注意,这个类是新的.NET 4.5,所以你需要使用该版本的BCL的。

The class is listed as being present in the System.Net.Http assembly. Note that this class is new for .NET 4.5, so you need to be using that version of the BCL.

这篇关于无法找到该DLL参考“HttpContent”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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