sta / websocket-sharp

A C# implementation of the WebSocket protocol client and server
http://sta.github.io/websocket-sharp
MIT License
5.73k stars 1.66k forks source link

websocket Send Method error at compile time in xamarin.forms app #344

Closed creepteks closed 7 years ago

creepteks commented 7 years ago

I use the following code to send a string to a Tornado webserver that is simply listening on 8888:

` using (var ws = new WebSocket("ws://127.0.0.1:8888/ws")) { ws.OnMessage += (sender, e) => Debug.WriteLine("Server says: " + e.Data );

            ws.Connect();
            ws.Send("{\"messageType\":\"Authentication\",\"message\":\"154668765\"}");
        } `

I get the following error on ws.Send(...), preventing me from building the xamarin app: Error CS7069 Reference to type 'FileInfo' claims it is defined in 'mscorlib', but it could not be found

However, use the exact same code in a C# console project and it's working fine!!!

lightofaugust commented 7 years ago

Hi, did you solve the problem? I'm facing the same problem during compile, but it works fine with unity editor mode.

Thanks!