在 .NET 4.5 中找不到 HttpClient [英] HttpClient is not found in .NET 4.5

查看:35
本文介绍了在 .NET 4.5 中找不到 HttpClient的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 .NET 4.5 中使用新的 HttpClient,但 Visual Studio 抱怨它不存在.我有 System.Net,但是当我输入 System.Net.Http 时,它也会抱怨.

I am trying to use the new HttpClient in .NET 4.5, but Visual Studio complains that it doesn't exist. I have System.Net, but when I type System.Net.Http, it complains for that too.

我应该为这个类下载一个新的发行版吗?

Am I supposed to download a new distributable for this class?

推荐答案

添加对System.Net.Http的引用:

这篇关于在 .NET 4.5 中找不到 HttpClient的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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