rdavisau / sockets-for-pcl

Cross-platform socket API for Xamarin iOS/Android/Forms, Xamarin.Mac/MonoMac, Windows Phone 8/8.1, Windows Store and Windows Desktop.
MIT License
223 stars 72 forks source link

System.TypeInitializationException when using TcpSocketClient #109

Open xitasoappdev opened 8 years ago

xitasoappdev commented 8 years ago

I want to use the TcpSocketClient in my Xamarin.Forms project with a PCL and native iOS/Android projects.

When I'm trying to use the TcpSocketClient and use the ConnectAsync(IP, Port) method, it throws a System.TypeInitializationException with the Message The type initializer for 'Sockets.Plugin.Abstractions.Resources.ServiceNames' threw an exception. and the InnerException An item with the same key has already been added..

Does someone face similar issues? I simply added the package rda.SocketsForPCL in Version 2.0.2 to the PCL project and the iOS/Android project.

Would be very thankful if someone could help me.

massimoperelli commented 8 years ago

I've the same problem. There was Port as string, but must be cast to integer.