I am trying to use System.Net.Sockets API in a portable class library so that my projects can reuse code for socket connections. But I cannot reference that namespace in my code.
As I understand it, PCLs limit you to assemblies that are available on all targeted platforms. But I am targeting ios, Android, and .Net 4.5 (using Xamarin), and all of these should have the system.dll assembly that contains the API. What am I missing?
As it is right now, there is no PCL profile targeting only
If you for example attempt to define a Portable Class Library with only these targets, the project PCL profile will automatically add the Silverlight 5 target:
Even though Silverlight 5 itself does support some of the System.Net.Sockets namespace types, none of these types have been transferred to any PCL profile. As far as I can tell, the PCL System.Net functionality is limited to HTTP networking.
For example, if .NET Framework 4.5 is selected, this will correspond to PCL profile 24, for which the System.Net.dll contents are as follows:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With