3

Brand new Windows Phone 8.1 project in C#, VS2013 update 4. The using System.Net.Sockets line gives a compilation error:

The type or namespace name 'Sockets' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)

The System.Net assembly is not available in the References dialog - it claims all possible assemblies have been already referenced. Trying to browse to it produces a message that the assembly is already referenced in the project.

What am I missing, please?

EDIT: in a project that's explicitly targeting WP8.0 (the template is called "Windows Phone Silverlight" as opposed to "Windows Phone") the namespace in question is available.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281

1 Answers1

0

Simple Answer: System.Net.Sockets is not supported on Windows Phone 8.1

Use Windows.Networking.Sockets instead. Documentation available here: https://msdn.microsoft.com/de-de/library/windows/apps/windows.networking.sockets.aspx

Florian-Rh
  • 777
  • 8
  • 26