HttpUtility并不在当前上下文中存在 [英] HttpUtility does not exist in the current context

查看:375
本文介绍了HttpUtility并不在当前上下文中存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编译一个C#应用程序时,我得到这个错误。看起来像一个微不足道的错误,但我不能左右它得到的。

I get this error when compiling a C# application. Looks like a trivial error, but I can't get around it.

我的设置是Windows 7的64位。 。视觉Studio 2010中的C#表达B2Rel

My setup is Windows 7 64 bit. Visual-Studio 2010 C# express B2Rel.

我加入到System.Web.dll程序的引用位于 C:\Program文件(x86) \Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 ,但它有一个黄色的感叹​​号,我仍然得到上述错误。我也有使用的System.Web 声明。

I added a reference to System.Web.dll located at C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0, but it has a yellow exclamation symbol and I still get the above error. I also have the using System.Web declaration.

我在做什么错了?

更新:获取提示答案的根源指向了我之后,我搜索了一下在谷歌到它指出System.Web.dll中是完整的框架。我没有找到这样的一个参考。结果
。对于像我这样的新手,的 这个 博客总结了框架(客户端和全)很好地之间的差异。我无法找到一个点,说了一定的Dll是否支持在客户端框架或没有。我想在Visual Studio中的感叹号应该是第一信号...

Update: After getting the prompt answer pointing me at the root cause, I searched a bit in Google to where it states that System.Web.dll is for the full framework. I did not find such a reference.
For newbies like me, this blog summarizes the difference between the frameworks (client and full) nicely. I could not find a spot that says whether a certain Dll is supported in the client framework or not. I guess the exclamation mark in Visual Studio should be the first signal...

推荐答案

您可能正在针对客户端配置文件,在System.Web.dll中不可用。

You're probably targeting the Client Profile, in which System.Web.dll is not available.

您可以针对在项目属性的完整的框架。

You can target the full framework in Project Properties.

这篇关于HttpUtility并不在当前上下文中存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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