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.
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.
Im using Visual Studio 2015
I try with this question: How Add System.Web Reference To A Windows Form Application But doesnt work for the Universal 10 app.
Thanks in advance!
The System.Web
assembly is a huge monolith that Microsoft themselves seem to be moving away from.
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.
来源:https://stackoverflow.com/questions/35500227/add-system-web-reference-to-a-windows-10-universal-app