0

How can i solve it ? If im doing in my code: using System.Web; it dosent help I tried ot add reference of System.Web.ApplicationServices didnt help also tried to reference: System.WebServices Didnt help either. This is the only two references that are using Web i have in the visual studio 2010 .net references list.

The line is:

var queryString = System.Web.HttpUtility.ParseQueryString(url);

The error is on the: HttpUtility

Error 1 The type or namespace name 'HttpUtility' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

The project is set on Target Framework to: .net 4 client profile. I have windows 8 64bit.

4

1 回答 1

5

该项目在目标框架上设置为:.net 4 客户端配置文件。

那就是问题所在。HttpUtility客户端配置文件中不存在。而是以完整的个人资料为目标(并确保您有对 的引用System.Web.dll)。

比较上述文档中的“版本信息”行:

.NET Framework
支持:4.5、4、3.5、3.0、2.0、1.1、1.0

与(比方说)System.String

.NET Framework
支持:4.5、4、3.5、3.0、2.0、1.1、1.0
.NET Framework Client Profile
支持:4、3.5 SP1
Portable Class Library
支持:Portable Class Library
.NET for Windows Store apps
支持:Windows 8

于 2013-11-08T16:53:08.760 回答