This could be a simple No if it's not possible, so first I'll ask outright, Is it possible to use Microsoft.AspNet.SignalR.Client with dnxcore50 right now?
If it should be possible, details of the error I'm hitting are below, this a vNext Console Application:
After adding a dependency on Microsoft.AspNet.SignalR.Client version 2.2.0 the code compiles correctly for dnx451, however for dnxcore50, I am getting an error that I can't seem to figure out:
var hubConnection = new HubConnection("http://localhost");
IHubProxy hubProxy = hubConnection.CreateHubProxy("MyHubName");
Visual Studio underlines the CreateHubProxy() method with the error:
The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'
Obviously as I want to use dnxcore50 I can't just add a reference to mscorlib. I'm trying to figure out if there's something under System that I should referencing here or if this package is just not compatible.
I've found out that at the moment, there's no (reasonably simple) way to get this running on dnxcore50.
I asked Scott Hanselman on Twitter too and he confirmed that you can't right now.
With this I will continue to use the vNext Console Application project so that when the SignalR Client Libraries offer support it should be the case of a config change and package update to run this on both Linux and Mac using .NET Core
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