将System.Web参考添加到Windows 10 Universal App [英] Add System.Web Reference To A Windows 10 Universal App
问题描述
我在 Gitgub 基本上是一个控制台应用程序. 但是我想将此C#控制台应用程序转换为通用Windows应用程序.
I download a project on Gitgub Basically is a Console Application. But I want to translate this C# Console Application to a Universal Windows App.
我想在Windows 10通用版中使用HttpUtility.UrlEncode,但是在.NET中找不到System.Web(添加参考)如何将这个程序集添加到我的项目中?
I want to use HttpUtility.UrlEncode in a windows 10 universal, but I can not find System.Web in .NET (Add Reference) How can I add this assembly to my project?
Error: The "HttpUtility" Does not existin the current context.
我正在使用Visual Studio 2015
Im using Visual Studio 2015
我尝试以下问题: 如何将System.Web参考添加到Windows窗体应用程序 但是不适用于Universal 10应用.
I try with this question: How Add System.Web Reference To A Windows Form Application But doesnt work for the Universal 10 app.
提前谢谢!
推荐答案
System.Web
程序集是微软自己似乎正在远离的庞大整体.
The System.Web
assembly is a huge monolith that Microsoft themselves seem to be moving away from.
通常,对于System.Web
中发现的任何功能,都有一个现代等效项可以在其他地方找到.
Usually, for any functionality found within System.Web
, there's a modern equivalent that can be found elsewhere.
In this case, you'd be looking for WebUtility.UrlEncode
instead, which is found in the System.Net
assembly and is listed as supported on the Universal Windows Platform.
这篇关于将System.Web参考添加到Windows 10 Universal App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!