HttpUtility.UrlEncode in console application

后端 未结 7 1798
长情又很酷
长情又很酷 2021-02-03 21:45

I\'d like to use HttpUtility.UrlEncode in a console application, VB.NET, VS 2010 Beta 2.

System.Web.HttpUtility.UrlEncode(item)

Error message:

7条回答
  •  走了就别回头了
    2021-02-03 22:12

    Changing the project's Target Framework from ".NET Framework 4 Client Profile" to ".NET Framework 4.0" helped me, with .NET Framework 4 Client Profile as Target framework I was able to add System.Web 2.0 version by Browsing to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 from Add reference window but doing the same for System.Web 4.0 dll gave a warning.

提交回复
热议问题