C# dotnet Http Pusher seems broken when updated via NuGet

0

Using PusherClient 0.5.1 with WebSocket4Net 0.15.2.

After a pile of NuGet updates, my existing code now breaks when I try to Connect(). As below:

    var pusher = new Pusher("de504dc5763aeef9ff52");
    pusher.Connect();

Error is:

System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'Void WebSocket4Net.WebSocket..ctor(System.String, System.String, System.Collections.Generic.List1<System.Collections.Generic.KeyValuePair2<System.String,System.String>>, System.Collections.Generic.List1<System.Collections.Generic.KeyValuePair2<System.String,System.String>>, System.String, System.String, WebSocket4Net.WebSocketVersion, System.Net.EndPoint)'.
Source=PusherClient
StackTrace:
at PusherClient.Connection.Connect()
at PusherClient.Pusher.Connect()
c#
pusher
websocket4net
asked on Stack Overflow Feb 8, 2018 by Sean • edited Feb 8, 2018 by Ahmet Kakıcı

2 Answers

0

This is usually what happens when you have old .dll files somewhere in your project, in this case the Websocket4Net package specifically.

Try "Clean Solution" if you're using VS and/or deleting the folder inside "packages/" containing Websocket4Net (it'll be restored automatically on the next build).

answered on Stack Overflow Feb 8, 2018 by FreezyLemon
0

This was due to an incompatibility with the latest version of websocket4net. The developers are updating Pusher to fix the issue. https://github.com/pusher/pusher-http-dotnet/issues/44

answered on Stack Overflow Mar 16, 2018 by Sean

User contributions licensed under CC BY-SA 3.0