Using Windows.Networking in a Unity project

I’m trying to use sockets for a HoloLens app.
For that, I need “using Windows.Networking” or “using System.Net” in C#.
I understand that for UWP, I need to add “using Windows.Networking”, but when I do, VS is not recognizing it.
If I use System.Network, Visual Studio (default editor) is “ok” with that, but when I compile, I get the error message that “Net” is not available in “System”.

Unity is configured to be a Win10 app, but the editor in VS is not, for some reason.

How can I just use the Win10 configs?

Thanks!

This is because the same code is built twice: once for Editor which uses Mono and .NET 3.5, and second time for UWP using .NET for that platform.
You should wrap UWP specific code with #if NETFX_CORE define.